Documents about Euclidean Distance

  • 1 Pages

    Program1_A08

    Uni. Worcester, A 08

    Excerpt: ... CS2303 Systems Programming Concepts Program 1 Due: September 5, 2008 at 11:59 p.m. Functions and Basic Variable Types in C A08 12 points The purpose of this programming assignment is to familiarize the student with C syntax, the use of functions in C, and working with a variety of C variable types. You are to write two C functions where all the formal parameters and the returned values are doubles: 1. A function that returns the log3 (x). 2. A function that computes the Euclidean distance between two points in a three dimensional space. The function will take as input two points specified by the coordinates (x1,y1, z1) and (x2, y2, z2). Main Assignment This assignment is similar in flow to the Lab 1 program. Assume the first integer read with scanf specifies the number of coordinate pairs to read in. Your program should only read in one pair of coordinates each time scanf executes. However, the coordinates are to be read in as integers. For each pair of points, compute and print out (using printf) the Eucli ...

  • 1 Pages

    Program1_C08

    Uni. Worcester, C 08

    Excerpt: ... CS2303 Systems Programming Concepts Program 1 Due: January 18, 2008 at 5 p.m. Functions and Basic Variable Types in C C08 12 points The purpose of this programming assignment is to familiarize the student with C syntax, the use of functions in C, and working with a variety of C variable types. You are to write two C functions where all the formal parameters and the returned values are doubles: 1. A function that returns the log2 (x). 2. A function that computes the Euclidean distance between two points in a two dimensional space. The function will take as input two points specified by the coordinates (x1,y1) and (x2, y2). Main Assignment This assignment is similar in flow to the Lab 1 program. Assume the first integer read with scanf specifies the number coordinate pairs to read in. Your program should only read in one pair each time scanf executes. However, the coordinates are to be read in as integers. For each pair of points, compute and print out (using printf) the Euclidean distance . After all the coor ...

  • 3 Pages

    HW3

    Delaware State, CIS 20310

    Excerpt: ... tion. Your goal will be to examine the influence of different search algorithm and criteria to the result. In each experiment, you are to extract 3 features and to take note about which three features are extracted. a. Start with Branch and Bound. i. Use probability distance, with distance type "divergence". Repeat the same with Mahalanobis distance and then with Patrik-Fisher distance. Compare the obtained results. ii. Now, let's find the feature subset using Branch and Bound algorithm but interclass distance. First, use Euclidean distance , do not compute from interclass scattermatrix, calculate distance also within the same class itself. Repeat analysis using Minkowski distance of order 1, calculate distance within the same class itself. Compare the obtained results. b. c. d. e. f. iii. EXTRA CREDIT: From Institute of Photogrammetry and Remote Sensing material posted on my web site, find formulas for all the distances mentioned in i and ii. Next, let's examine backward search i. Use probability dista ...

  • 8 Pages

    lect22

    Georgia Tech, ECE 4601

    Excerpt: ... ' $ EE4601 Communication Systems Lecture 22 General Error Probability Analysis & % 0 c 2007, Georgia Institute of Technology (lect22 1) ' Binary Error Probability $ Consider two signal vectors s1 and s2 . The received signal vector is r = si + n A coherent maximum likelihood or minimum distance receiver decides in favor of the signal point s1 or s2 that is closest in Euclidean distance to the received signal point r. The error probability between s1 and s2 is P (s1 , s2 ) = Q 2 d12 2No where d2 = s1 - s2 12 & 2 is the squared Euclidean distance between s1 and s2 . % 0 c 2007, Georgia Institute of Technology (lect22 2) ' $ Error Probability and Euclidean Distance The error probability depends on the Euclidean distance between the signal vectors. If we have two signal vectors s1 and s2 , separated by Euclidean distance d12 = s1 - s2 , then the error probability is Pe = Q 2 d12 2No For BPSK d12 = E 2 For BFSK d12 = 2E & % 0 c 2007, Georgia Institute of Technology (lect22 8 ...

  • 3 Pages

    Lecture_Clustering

    McGill, COMP 76602

    Excerpt: ... n terms of Euclidean distance . Until C stops changing. Example: initial data Example: assign into 4 clusters randomly Example: compute centroids Example: reassign clusters Example: recompute centroids Example: reassign clusters Example: recompute centroids done! How about 3 clusters? Example: initial data Example: assign into 3 clusters randomly Example: compute centroids Example: reassign clusters Example: recompute centroids Example: reassign clusters Example: recompute centroids done! Issues with K-means clustering Does the algorithm always terminate? Does it always nd the same answer? How many clusters are there? Issues with K-means clustering Does the algorithm always terminate? yes Does it always nd the same answer? no How many clusters are there? hard to say Termination of K-means clustering For given data {x1 , . . . , xm } and a clustering C , consider m f= i=1 xi C(i) 2 , where j denotes the centroid of the ...

  • 1 Pages

    a3answ

    McGill, CIM 558

    Excerpt: ... Assignment 3 Discussion Most of you have noted that the algorithm made some false matches. You were asked to discuss the inherent limitations of the method. I will summarize some of the strong points raised in your solutions. This method compares two images based on their pixel intensities. Although all images are those of faces, there is a great variation in pixel intensity between images of the same face due to dierences in lighting, pose, scale and shift of the face. Although eort has been made to normalize these variations, more sophisticated approaches are necessary to achieve better recognition. Incorporating higher-level information into the matching, such as the location of eyes and mouth, would make this algorithm much more robust, at the cost of reducing simplicity. Further, the use of Euclidean distance in measuring similarity between points in eigenspace is arbitrary and is not necessarily the most appropriate metric for this task. We have chosen to project onto the space of the rst 10 ei ...

  • hw1

    UCLA, EE 236

    Excerpt: ... L. Vandenberghe EE236B Winter 2009 Additional problems for homework assignment #1 1. The Cauchy-Schwarz inequality states that |aT b| a 2 b 2 for all vectors a, b Rn (see page 633 of the textbook). (a) Prove the Cauchy-Schwarz inequality. Hint. A simple proof is as follows. With a and b xed, consider the function g(t) = a + tb 2 of the scalar variable t. This function is nonnegative for all 2 t. Find an expression for inf t g(t) (the minimum value of g), and show that the Cauchy-Schwarz inequality follows from the fact that inf t g(t) 0. n k=1 (b) The 1-norm of a vector x is dened as x 1 = inequality to show that x 1 n x for all x. |xk |. Use the Cauchy-Schwarz 2 (c) The harmonic mean of a positive vector x Rn is dened as + 1n1 n k=1 xk 1 . k Use the Cauchy-Schwarz inequality to show that the arithmetic mean ( of a positive n-vector is greater than or equal to its harmonic mean. xk )/n 2. A matrix X Sn is a Euclidean distance matrix if its elements xij can ...

  • 38 Pages

    Lecture_14

    Texas A&M, ENTO 601

    Excerpt: ... res that satisfy triangle inequality are called Metrics Failure of triangle inequality implies that the distance measure is generating negative distances Negative distances are an artifact of the way in which distance is computed Euclidean Distance B 6 5 4 3 2 1 j A 1 2 3 4 5 6 i Euclidean Distance B 6 Dij = [(xai-xaj xai = value of character a in o.t.u. I xaj = value of character a in o.t.u. j )2 5 4 3 2 1 j i A 1 2 3 4 5 6 Euclidean Distance B 6 Dij = [(xai-xaj)2 + (xbi-xbj)2]1/2 xbi = value of character b in o.t.u. i xbj = value of character b in o.t.u. j 5 4 3 2 1 j i A 1 2 3 4 5 6 Euclidean Distance B 6 Dij = [(xai-xaj)2 + (xbi-xbj)2]1/2 xai = value of character a in o.t.u. I xaj = value of character a in o.t.u. j 5 4 3 2 1 j i Dij A 1 2 3 4 5 6 Euclidean Distance 3 dimensions Euclidean Distance N-dimensional case Djk = [ (Xij - Xik)2 ]1/2 Xij = value of ith character in o.t.u. j Xik = value of ith character in o.t.u. k Euclidean Distance Assumes characters to ...

  • 6 Pages

    lecture14_2008

    Mich Tech, FW 5550

    Excerpt: ... 10/22/2008 Geographic Information Systems for Resource Management FW5550 Lecture 14 Raster GIS Analysis Functions Different set of commands for working with raster data Vector Extract Clip- polygon Raster Extraction Extract by Circle Mask Points Polygon Rectangle 1 10/22/2008 Inside = Clip Outside = Erase 2 10/22/2008 3 10/22/2008 Raster addition = Union Can also perform subtraction, multiplication, division and other algebraic expressions. Raster Calculator allows you to perform mathematical calculations using operators and functions along with selection queries Spatial Analyst dropdown menu 4 10/22/2008 Vector to Raster Conversion/ Raster to Vector Conversion 5 10/22/2008 Distance The Euclidean distance output raster contains the measured distance from every cell to the nearest source. The distances are measured as the crow flies ( ( Euclidean distance ) in the projection units of the ) pj raster, such as feet or meters and are computed from cell center to cell center. Lecture 21 FW ...

  • 5 Pages

    jayant

    Johns Hopkins, CS 619

    Excerpt: ... h that every member is < from centoid (distance is Euclidean distance ) Check Euclidean distance s of clusters of a node with clusters of other node If there are atleast min clusters of other nodes in the neighbourhood, the data is fine. Else, either outlier data or Faulty sensor. Other possible approaches - Interpolate the value of node n using (n-1) nodes and compare. - Fishing for ideas from the class !. ...

  • 2 Pages

    206Review

    Stanford, STAT 206

    Excerpt: ... Review Stat 206, 3/17 Note: the final will cover the midterm, as well as topics such as the following: 1. Give Examples Of . A 3*3 `distance' matrix which does not obey the triangle inequality A 3*3 distance matrix which is not Euclidean A 3*3 Euclidean distance matrix Two different sets of points X = { xt } and Y = { yt} in dimension p=2 which have the same interpoint distances e. A hierarchical clustering method which has a tendency to form elongated `chains' f. A hierarchical clustering method which has a tendency to form compact rounded clusters. 2. True or False (write out "True" or "False" completely) _ There is no one `best' clustering method; in other words, cluster analysis is usually art rather than science. Applying metric multidimensional scaling to a non- euclidean distance matrix can yield negative eigenvalues. Negative eigenvalues in metric multidimensional scaling have no physical significance, and the corresponding eigenvectors should not be used in constructing a point configurati ...

  • 53 Pages

    lec4-clustering

    Lehigh, CSE 450

    Excerpt: ... rity of two elements in a set is determined, e.g. Euclidean Distance Manhattan Distance Inner Product Space Maximum Norm Or any metric you define over the space. Types of Algorithms Hierarchical Clustering vs. Partitional Clustering Hierarchical Clustering Builds or breaks up a hierarchy of clusters. Partitional Clustering Partitions set into all clusters simultaneously. Partitional Clustering Partitions set into all clusters simultaneously. K-Means Clustering Super simple Partitional Clustering Choose the number of clusters, k Choose k points to be cluster centers Then. K-Means Clustering iterate { Compute distance from all points to all kcenters Assign each point to the nearest k-center Compute the average of all points assigned to all specific k-centers Replace the k-centers with the new averages } But! The complexity is pretty high: k * n * O ( distance metric ) * num (iterations) Moreover, it can be necessary ...

  • 6 Pages

    exercise_supervised_signature_081020

    Alaska Anch, ENVS 403

    Excerpt: ... llection 1. Locate 2-3 fairly homogeneous-appearing features in the image; this could be water, dense homogenous vegetation, ice, or bare areas, etc. 2. From the AOI Tool Palette, click the Region Growing Properties button (note: the subtle difference between the Region Growing button and the Region Growing Properties button). 3. Select the 8-neighbor mode (the button that resembles a nine by nine grid) from the Region Growing Properties dialog box. Page 4 of 6 ENVS403: supervised classification Fall 2008 4. Set the Spectral Euclidean Distance to 10. Spectral Euclidean Distance : Enter the Euclidean spectral distance in digital number (DN) units on which to accept pixels. The pixels that are accepted will be within this spectral distance from the mean of the seed pixel. 5. Navigate to one of the sites that appears homogenous within the image. 6. Select the Region Grow Tool from the AOI Tool Palette 7. Click on a pixel within the homogenous region and evaluate the Region Grow results. 8. If the Region G ...

  • 2 Pages

    LectureNotes0

    Georgia Tech, MATH 497

    Excerpt: ... should do, is Exercise 1. (The Cauchy-Schwartz inequality) Prove that | p, q | p q , 1 for all p and q in Rn (Hints: If p and q are linearly dependent the solution is clear. Otherwise, let f () := p - q, p - q . Then f () > 0. Further, note that f () may be written as a quadratic equation in . Hence its discriminant must be negative). 1 Last revised: September 1, 2004 1 The standard Euclidean distance in Rn is given by dist(p, q) := p - q . Exercise 2. (The triangle inequality) Show that dist(p, q) + dist(q, r) dist(p, r) for all p, q in Rn . (Hint: use the Cauchy-Schwartz inequality). By a metric on a set X we mean a mapping d : X X R such that 1. d(p, q) 0, with equality if and only if p = q. 2. d(p, q) = d(q, p). 3. d(p, q) + d(q, r) d(p, r). These properties are called, respectively, positive-definiteness, symmetry, and the triangle inequality. The pair (X, d) is called a metric space. Using the above exercise, one immediately checks that (Rn , dist) is a metric space. Geometry, in its broadest ...

  • 3 Pages

    Lab3

    Wilfrid Laurier, ENEL 563

    Excerpt: ... result. Note that synchronized averaging is a type of ensemble averaging. Kamath et al. [1] applied synchronized averaging to improve the SNR of cortical evoked potentials related to electrical and mechanical stimulation of the esophagus. Although improvement in SNR was obtained in some experiments, they also observed that habituation 1 took place as the number of stimuli was increased beyond a certain limit, and that the use of the ERPs obtained after habituation in averaging led to a reduction in the SNR. Kamath et al. estimated the SNR as follows: Noise power: 2 1 = NT (M 1) 2 y = M N k=1 n=1 [yk (n) y (n)]2 . 2 . M (3) Signal power: 1 NT N n=1 [(n)]2 y 2 y . 2 (4) SNR = Here, T = 0.001 s is the sampling interval. (5) Kamath et al. also computed the Euclidean distance between the original ERP signals and the averaged signal obtained as 1 D= M M k=1 N n=1 [yk (n) y (n)]2 . (6) Laboratory Exercise Copy the data les E11 to E2424 and the MATLAB pro ...

  • 11 Pages

    lect17

    Georgia Tech, ECE 4601

    Excerpt: ... hat & T 1 sj (t)sk (t)dt Ej Ek 0 N T N 1 sjn fn (t) skm fm (t) dt Ej Ek 0 n=1 m=1 N N T 1 sjn skm fn (t)fm (t)dt 0 Ej Ek n=1 m=1 N 1 sjn skn Ej Ek n=1 sj sk sj sk = 0 , 1 , if sj (t) and sk (t) are orthogonal if sj (t) = sk (t) % 0 c 2007, Georgia Institute of Technology (lect17 9) ' Properties of Signal Vectors $ Euclidean Distance : The Euclidean distance between two signals sj (t) and sk (t) is T 1/2 djk = = = = = N 0 T N sjn fn (t) 0 n=1 (sj (t) - sk (t)2 dt N - m=1 n=1 sj - sk sj - sk (sjn - skn )2 2 1/2 1/2 skm fm (t) dt 2 1/2 & % 0 c 2007, Georgia Institute of Technology (lect17 10) ' Example $ Consider the earlier example where s1 = ( T /3, 0, 0) s2 = ( T /3, T /3, 0) s3 = (0, T /3, T /3) We have E1 = s1 2 = T /3, E2 = s2 2 = 2T /3, and E3 = s3 The correlation between s2 (t) and s3 (t) is 23 = s2 s3 T /3 = = 0.5 s2 s3 2T /3 2 = 2T /3. The Euclidean distance between s1 (t) and s3 (t) is d13 = s1 - s3 = T /3 + T /3 + T /3 = T & % 0 c 2007, G ...