기호/표기 ISO 기호: d(A, B) := distance between points A and B 기타 빼기와 [[절대값,absolute_value]]기호를 혼용한 $|A-B|$ dist(A, B)등이 쓰임. // tmp delme. 이런 식. { n-공간 속의 점 $A=(a_1,\cdots,a_n)$ 과 원점 사이의 거리는 피타고라스 정리에 의하여 $|A|:=\sqrt{a_1^2+\cdots+a_n^2}$ 이다. 일반적으로, 두 점 $A=(a_1,a_2,\cdots,a_n),\,B=(b_1,b_2,\cdots,b_n)$ 사이의 '''거리'''는 $\text{dist}(A,B):=|A-B|=\sqrt{(a_1-b_1)^2+(a_2-b_2)^2+\cdots+(a_n-b_n)^2}$ 이다. (김홍종 미적1+ p152) } ---- 수직선에서 두 점 $x_1, x_2$ 사이 거리는 $\sqrt{(x_2-x_1)^2}=|x_2-x_1|$ 좌표평면에서 두 점 $(x_1,y_1),\,(x_2,y_2)$ 사이 거리는 $\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$ 좌표공간의 두 점 $(x_1,y_1,z_1),\,(x_2,y_2,z_2)$ 사이 거리는 $\sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}$ n차원 [[유클리드_공간,Euclidean_space]](curr goto [[공간,space]])의 두 점 $(x_1,x_2,\cdots,x_n)$ 과 $(y_1,y_2,\cdots,y_n)$ 사이의 거리는 $\sqrt{(x_1-y_1)^2+(x_2-y_2)^2+\cdots+(x_n-y_n)^2}$ [[점,point]] $P(x_1,y_1)$ 과 [[직선,line]] $ax+by+c=0$ 사이의 거리는 $\frac{|ax_1+by_1+c|}{\sqrt{a^2+b^2}}$ 점 $P_0(x_0,y_0,z_0)$ 와 [[평면,plane]] $ax+by+cz+d=0$ 사이의 거리는 $\frac{|ax_0+by_0+cz_0+d|}{\sqrt{a^2+b^2+c^2}}$ 분자는 점 $P_0$ 를 평면 방정식에 대입하고 [[절대값,absolute_value]]을 취한 것. (그냥 대입만 하지 않고 절대값을 취한 것은, 구할 것이 [[변위,displacement]]가 아니고 '''거리'''니까?) 분모는 평면의 [[법선벡터,normal_vector]]의 크기. 이것은 [[사영,projection]], 특히 [[정사영,orthogonal_projection]]과 관련. ---- 유클리드 공간 내 두 벡터 사이의 거리 { 두 벡터 $\vec{u},\vec{v}\in\mathbb{R}^n$ 사이의 거리: $\operatorname{dist}(\vec{u},\vec{v})=||\vec{u}-\vec{v}||$ 즉 [[벡터,vector]]의 [[차이,difference]]의 [[노름,norm]] The distance between '''u''' and '''v''' is the length of '''u−v'''. 두 벡터 $\vec{v},\vec{w}$ 사이의 거리는 $|\vec{v}-\vec{w}|$ 로 정의한다. 이 값은 두 벡터에 대응되는 점들 ''(즉 [[위치벡터,position_vector]]로 볼 때?)'' 사이의 거리와 같다. (김홍종) } ---- https://i.imgur.com/BNzlvNN.jpg * $d_E((x_1,y_1),(x_2,y_2))=\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$ * $d_M((x_1,y_1),(x_2,y_2))=\text{max}\left{|x_1-x_2|,|y_1-y_2|\right}$ * $d_T((x_1,y_1),(x_2,y_2))=|x_1-x_2|+|y_1-y_2|$ tmp from [[https://terms.naver.com/entry.naver?docId=3405041&cid=47324&categoryId=47324 수학백과: 두 점 사이의 거리]] = 정의? = 두 [[점,point]]s에 대해 [[실수,real_number]]나 [[스칼라,scalar]]값을 돌려주는 [[함수,function]]?? ---- (정의) 거리 집합 S에 속한 요소 x, y, z에 대해 '''거리''' d는 다음을 만족하는 함수로 정의한다. ||(1) ||d(x, y) = d(y, x) ||대칭성(symmetry) || ||(2) ||d(x, y) > 0, d(x, y) = 0 ⇔ x = y ||양정성(positivity) || ||(3) ||d(x, z) ≤ d(x, y) + d(y, z) ||삼각형 부등식(triangle inequality) || (이승준 p21) ---- WpKo:거리 WpEn:Distance https://mathworld.wolfram.com/Distance.html = 거리의 조건? = //tmp from https://blog.naver.com/minzzang68/221995574047 공집합이 아닌 집합 X에 대해 함수 d가 다음을 만족한다면 X에서의 '''거리,distance'''. 함수 $d:X\times X\to\mathbb{R}$ 에 대해 $d(x,x)=0;\;\;d(x,y)>0 \text{ if } x\ne y$ $d(x,y)=d(y,x)$ ([[대칭성,symmetry]]) $d(x,z)\le d(x,y)+d(y,z)$ ([[삼각부등식,triangle_inequality]]) 이럴 때 $(X,d)$ 가 [[거리공간,metric_space]]이라 한다. = [[통계,statistics]] 관점에서 본 거리 = http://contents.kocw.or.kr/KOCW/document/2014/sookmyung/yeoinkwon/3.pdf page 36 임의의 점 a, b, c에 대해 * a = b ⇔ D(a,b) = 0 * D(a,b) = D(b,a) * D(a,b) ≤ D(a,c) + D(c,b) [[삼각부등식,triangle_inequality]] 예 D(a,b)=|a-b| D(a,b)=(a-b)^^2^^ <= 특이하군 = Sub: / 이하 각종 거리들 = [[단위거리,unit_distance]] - 거리가 항상 [[하나,one]]인 세계? [[unit_distance_code]] [[그레이_부호,Gray_code]] 등. [[unit_distance_graph]] https://en.wikipedia.org/wiki/Unit_distance_graph [[유클리드_기하학,Euclidean_geometry]]의 거리: [[유클리드_거리,Euclidean_distance]] { '''유클리드 거리, Euclidean distance''' AKA L2거리 [[WtEn:Euclidean_distance]] [[피타고라스_정리,Pythagorean_theorem]]와 밀접 [[유클리드_노름,Euclidean_norm]], [[유클리드_거리,Euclidean_metric]]과 관련이? https://planetmath.org/euclideandistance } [[taxicab_geometry]]의 거리: [[맨해튼_거리,Manhattan_distance]] [[WpEn:Taxicab_geometry]] [[Libre:택시_기하학]] (easy) //tmp from https://dyndy.tistory.com/158 { AKA 택시거리, L1거리, 시가지 거리 평면 위 $(x_1,x_2)\cdots(x_2,y_2)$ 사이 거리는 $|x_1-x_2|+|y_1-y_2|$ } add: https://xlinux.nist.gov/dads/HTML/manhattanDistance.html https://mathworld.wolfram.com/TaxicabMetric.html //tmp from https://dimenchoi.tistory.com/81 { 택시 거리(Taxicab distance) ## taxicab_distance 두 점 $(x_1,x_2,\cdots,x_n),\,(y_1,y_2,\cdots,y_n)$ 사이의 택시 거리는 $|x_1-y_1|+|x_2-y_2|+\cdots+|x_n-y_n|$ 체비셰프 거리(Chebyshev distance) ## Chebyshev_distance 두 점 $(x_1,x_2,\cdots,x_n),\,(y_1,y_2,\cdots,y_n)$ 사이의 택시(오타인듯. 체비셰프) 거리는 $\text{max}\left( |x_1-y_1|, |x_2-y_2|, \cdots, |x_n-y_n| \right)$ } [[WpEn:Chebyshev_distance]] 편집거리 edit_distance - [[문자열,string]]의 { [[string_metric]]의 일종. 두 [[문자열,string]]이 얼마나 다른지(dissimilar, opp. [[유사도,similarity]])에 대한 [[측도,measure]]. 바로 아래 Hamming, Levenshtein, Jaro distance, longest_common_subsequence(LCS) 가 여기에 속한다고. https://freshrimpsushi.github.io/posts/edit-distance-of-strings/ WpEn:Edit_distance ... Google:편집거리 Google:edit_distance Up: [[string_metric]] ''[[dissimilarity_measure]]? 이런 표현 있나? Google:dissimilarity_measure '' } ## from 처음배우는인공지능 p116 { [[레벤슈타인_거리,Levenshtein_distance]] { 값이 아닌 [[문자열,string]] 사이 [[유사도,similarity]]를 나타낼 때 사용 https://everything2.com/title/Levenshtein+distance https://xlinux.nist.gov/dads/HTML/Levenshtein.html } [[해밍_거리,Hamming_distance]] 고정 길이의 이진 [[자료,data]]에서 서로 다른 비트 부호 수를 갖는 문자 개수 주로 [[오류,error]] 검사에 활용 WpKo:해밍_거리 related: parity bit ?..., [[해밍_코드,Hamming_code]] ... 뿐만 아니라 block_code 에서 '''distance''' 혹은 '''minimum_distance''' (같은뜻? chk) $d$ $d=$ 두 codewords에서 다른 위치의 수? chk 그리고 상대거리? 상대적거리? relative_distance $\delta$ $\delta=d/n$ 을 정의 가능. curr tmp see [[WpEn:Block_code#The_distance_d]] [[마할라노비스_거리,Mahalanobis_distance]] 유클리드 거리에서 점 수를 늘린 것 [[산포도,dispersion]]의 점을 3개 이상 썼을 때 관계를 거리로 나타낸 것 $d(x,y)=\sqrt{(x-y)^T\operatorname{cov}(x,y)^{-1}(x-y)}$ $d(x,y)=\sqrt{\sum_{i=1}^{n}\frac{(x_i-y_i)^2}{\sigma_i^2}}$ $\sigma_i=1$ 이면 유클리드 거리와 같음 WpEn:Mahalanobis_distance ## } [[Jaro_distance]] or [[Jaro-Winkler_distance]] Jaro distance, Jaro-Winkler distance { WpEn:Jaro–Winkler_distance "Jaro-Winkler_similarity" } longest_common_subsequence (LCS) { WpEn:Longest_common_subsequence } 자카드 거리 Jaccard distance [[Jaccard_distance]] 자카드 유사도(Jaccard_index) 관련임. curr See [[유사도,similarity]]. Hausdorff distance [[하우스도르프_거리,Hausdorff_distance]] - writing [[코사인거리,cosine_distance]] = [[코사인유사도,cosine_similarity]] − 1 { https://rfriend.tistory.com/319 ... Naver:cosine.distance Google:cosine.distance } [[각거리,angular_distance]] - writing Lm_distance { https://xlinux.nist.gov/dads/HTML/lmdistance.html 에 의하면 aka 일반화된 거리 [[generalized_distance]] .... [[일반화,generalization]] aka [[민코프스키_거리,Minkowski_distance]] } earth mover's distance (EMD) [[earth_mover_distance]] { (대충) 어떤 [[확률분포,probability_distribution]]를 다른 분포로 바꿀 때 필요한 일의 양, 그걸 최소화하는 [[최적화,optimization]] 문제에서 - 그 최소의 변환비용이 EMD. ( via https://frhyme.github.io/python-libs/pyemd_EarthMoverDistance/ ) rel. [[transportation_problem]] = transport_problem, transportation_theory { ... Naver:transportation+problem Google:transportation+problem } [[t근접성,t-closeness]] { ... Naver:t-근접성 Google:t-근접성 Google:t-closeness } [[WpEn:Earth_mover's_distance]] = https://en.wikipedia.org/wiki/Earth_mover%27s_distance ... Naver:earth+mover+distance ... Google:earth+mover+distance } [[Wasserstein_distance]] - writing { 이것도 바로 위에 EMD와 마찬가지로 [[transportation_problem]], [[geodesic]]관련 [[GAN,generative_adversarial_network]]에 응용. - WpEn:Wasserstein_GAN (WGAN) } ---- 비슷한 개념인가? [[절대값,absolute_value]] [[변위,displacement]]는 벡터, '''거리'''는 스칼라? 변위는 +/0/-, 거리는 0/+ only? '''거리'''는 최단거리가 아닌 것과 최단거리인 것이 있고, 최단거리는 [[변위,displacement]]와 관련이 있고(아마 변위의 노름이 최단거리? chk), 둘 다 [[경로,path]]와 관련이 있음. [[벡터,vector]]의 차([[차이,difference]])의 [[노름,norm]]과 같음. - 이건 돌아가는 거리 제외한 최단거리 얘기지? chk. 거리벡터의 magnitude로 볼 수도 있음. See [[위치벡터,position_vector]](위치벡터 and 거리벡터) 수직선의 두 점을 생각할 때, $a