0 votes
1 view
in Machine Learning by (4.1k points)

1 Answer

0 votes
by (10k points)

Euclidean distance is one of the major parameters while working with k nearest neighbor. It serves as the default distance between two sample spaces. Another prominent example is hierarchical clustering, agglomerative clustering (complete and single linkage) where you want to find the distance between clusters.

It represents the distance between two sample points in an n-dimensional space. 

The formula for Euclidean distance is calculated as : 

{\displaystyle {\begin{aligned}d(\mathbf {p} ,\mathbf {q} )=d(\mathbf {q} ,\mathbf {p} )&={\sqrt {(q_{1}-p_{1})^{2}+(q_{2}-p_{2})^{2}+\cdots +(q_{n}-p_{n})^{2}}}\\[8pt]&={\sqrt {\sum _{i=1}^{n}(q_{i}-p_{i})^{2}}}.\end{aligned}}}

Welcome to Intellipaat Community. Get your technical queries answered by top developers !