Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs for cosine_distance #24005

Merged
merged 1 commit into from
Nov 4, 2024
Merged

Add docs for cosine_distance #24005

merged 1 commit into from
Nov 4, 2024

Conversation

mosabua
Copy link
Member

@mosabua mosabua commented Nov 1, 2024

Description

See title, but we need to decide how to proceed .. do we want these docs in math.md or array.md? Do we want to link from one to the other? What do we want in terms of arguments .. use x y or the array double.

Additional context and related issues

Follow up to #23964

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.

@cla-bot cla-bot bot added the cla-signed label Nov 1, 2024
@mosabua mosabua requested review from martint and dain November 1, 2024 17:35
@github-actions github-actions bot added the docs label Nov 1, 2024
@mosabua mosabua marked this pull request as draft November 1, 2024 17:40
@mosabua mosabua marked this pull request as ready for review November 1, 2024 17:43
Returns the cosine similarity between the sparse vectors `x` and `y`:

```
```sql
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having this kinda begs the questions if we should add cosine distance for sparse vectors as well .. should be the same 1-similarity from what I know

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wdyt @dain ?

docs/src/main/sphinx/functions/math.md Outdated Show resolved Hide resolved
docs/src/main/sphinx/functions/math.md Outdated Show resolved Hide resolved
docs/src/main/sphinx/functions/math.md Outdated Show resolved Hide resolved
@mosabua mosabua force-pushed the cosine branch 2 times, most recently from da9387c to 82aa59e Compare November 1, 2024 21:36
## Geometric functions

:::{function} cosine_distance(array(double), array(double)) -> double
Calculates the cosine distance of two double arrays:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Calculates the cosine distance of two double arrays:
Calculates the cosine distance between two dense vectors:

docs/src/main/sphinx/functions/math.md Outdated Show resolved Hide resolved
docs/src/main/sphinx/functions/math.md Outdated Show resolved Hide resolved
docs/src/main/sphinx/functions/math.md Show resolved Hide resolved
Add docs for new cosine_distance function, move related docs, and clean up
and docs
@mosabua mosabua merged commit bd9fee7 into trinodb:master Nov 4, 2024
4 of 8 checks passed
@mosabua mosabua deleted the cosine branch November 4, 2024 18:30
@github-actions github-actions bot added this to the 465 milestone Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants