Skip to content

Commit 0781cba

Browse files
Update EUCLIDEAN_DISTANCE.md (microsoft#6625)
Corrected the capitalization of the page header/title. I also removed the manually typed math and replaced it with inline LaTeX display math to make the formulas easier to read as well as to add a more professional look. For some reason, when using the `$$` LaTeX delimiter, GitHub sometimes cuts off the vertical portion of large square root symbols. I sort of see that happening here with the second formula, but when I zoom in and out, it corrects itself, so I'm unsure if it's how the browser is drawing the formula, or if the issue originates solely with GitHub. If it's present on the screen of any reviewers, please let me know and I'll switch the code to use the single `$` LaTeX delimiter which doesn't have this problem. The only downfall with the single `$` delimiter is that it defaults to left alignment instead of center alignment, but I'm pretty sure that can be manually adjusted. Take Care ### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? The manually typed math looked a tad sloppy and was a bit difficult to read. 2. What problem does it solve? It makes the math formulas easier to read and understand because LaTeX formats the formulas properly as well as providing accessibility options for users who need to tweak how the formulas are displayed. 3. What scenario does it contribute to? Being able to read the documents without any confusion. 4. If it fixes an open issue, please link to the issue here. --> ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄
1 parent 95e4c42 commit 0781cba

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/EUCLIDEAN_DISTANCE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# Euclidean distance
1+
# Euclidean Distance
22

33
Euclidean distance is a mathematical concept that measures the straight-line distance
44
between two points in a Euclidean space. It is named after the ancient Greek mathematician
55
Euclid, who is often referred to as the "father of geometry". The formula for calculating
6-
Euclidean distance is based on the Pythagorean theorem and can be expressed as:
6+
Euclidean distance is based on the Pythagorean Theorem and can be expressed as:
77

8-
d = √(x2 - x1)² + (y2 - y1)²
8+
$$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
99

10-
In higher dimensions, this formula can be generalized to:
10+
For higher dimensions, this formula can be generalized to:
1111

12-
d = √(x2 - x1)² + (y2 - y1)² + ... + (zn - zn-1)²
12+
$$d(p, q) = \sqrt{\sum\limits_{i\=1}^{n} (q_i - p_i)^2}$$
1313

1414
Euclidean distance has many applications in computer science and artificial intelligence,
1515
particularly when working with [embeddings](EMBEDDINGS.md). Embeddings are numerical

0 commit comments

Comments
 (0)