[ home ] [ math / cs / ai / phy / as / chem / bio / geo ] [ civ / aero / mech / ee / hdl / os / dev / web / app / sys / net / sec ] [ med / fin / psy / soc / his / lit / lin / phi / arch ] [ off / vg / jp / 2hu / tc / ts / adv / hr / meta / tex ] [ chat ] [ wiki ]

Viewing source code

The following is the source code for post >>>/math/114

>>113
Cosine similarity is \eqn{\frac{\sum_{k=1}^n x_ky_k}{\sqrt{\sum_{k=1}^n x_k^2}\cdot\sqrt{\sum_{k=1}^n y_k^2}}}

Minkowski distance is \eqn{\left(\sum_{k=1}^n|x_k - y_k|^p\right)^\frac{1}{p}}

Euclidean distance is a speacial case of Minkowski distance when \eqn{p=2} i.e. \eqn{\sqrt{\sum_{k=1}^n (x_k - y_k)^2}}


Your matrix is \eqn{X} means:
,bmat x_1 & y_1\\x_2 & y_2\\x_3 & y_3\\x_4 & y_4\\