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 livebook #262

Merged
merged 6 commits into from
May 8, 2024
Merged

Conversation

msluszniak
Copy link
Contributor

Closes #237

@josevalim
Copy link
Contributor

Looks great! Should we also talk about NNDescent?

@@ -0,0 +1,255 @@
<!-- livebook:{"file_entries":[{"name":"knn_gyms.png","type":"attachment"}]} -->
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, you should also run the notebook with persist outputs enabled, so we have the outputs in the guides. :)

Copy link
Member

@krstopro krstopro left a comment

Choose a reason for hiding this comment

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

Several comments.
I will probably have another look later even though it looks great so far.

notebooks/nearest_neighbors.livemd Show resolved Hide resolved
notebooks/nearest_neighbors.livemd Show resolved Hide resolved
| ![Random Projection Forest](http://www.math.umassd.edu/~dyan/rpKNN.png?attredirects=0) |
| :------------------------------------------------------------------------------------: |

Figure 3: A process of creating a tree in Random Projection Forest. Source: http://www.math.umassd.edu/~dyan/rpKNN.png?attredirects=0
Copy link
Member

Choose a reason for hiding this comment

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

Not sure about this figure. The reason is that random projection trees in Scholar always split the data in half. Perhaps the one from https://cseweb.ucsd.edu/~dasgupta/papers/rptree-stoc.pdf or https://cseweb.ucsd.edu/~dasgupta/papers/exactnn-algo.pdf might be a better idea?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are there any photos of these on the internet that I could link to?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will include the image from the first paper that shows how splitting looks like in the case of kdtree and rpf, but I will leave the original image and mention that actual splitting in Scholar is implemented differently.

Copy link
Member

@krstopro krstopro May 8, 2024

Choose a reason for hiding this comment

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

That might be a better idea. :)

Copy link
Member

Choose a reason for hiding this comment

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

I don't think it's that important, so feel free to leave the existing figure if you want. :)

notebooks/nearest_neighbors.livemd Show resolved Hide resolved
notebooks/nearest_neighbors.livemd Show resolved Hide resolved
notebooks/nearest_neighbors.livemd Show resolved Hide resolved
notebooks/nearest_neighbors.livemd Show resolved Hide resolved
@msluszniak msluszniak requested a review from josevalim May 8, 2024 15:53
@msluszniak msluszniak merged commit e0e92d0 into elixir-nx:main May 8, 2024
2 checks passed
@msluszniak msluszniak deleted the nearest_neighbors_livebook branch May 8, 2024 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a notebook comparing the outputs of different neighbors algorithms
3 participants