Skip to content

Changed code example for FAQ #1

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

Closed
wants to merge 1 commit into from
Closed

Conversation

sillystring13
Copy link
Owner

Reference Issue

Related to: scikit-learn#7669

What does this implement/fix? Explain your changes.

Problem:
The doc/faq example "How do I deal with string data (or trees, graphs...)?" has a chunk of code that doesn't work if you increase the number of samples.

Fix:
The code example needs the parameter 'algorithm=brute' for the the custom distance metric with data indexing to work correctly. Otherwise, for larger datasets the default 'algorithm=auto' will choose an incompatible algorithm which breaks the custom data indexing.

Any other comments?

Here's a notebook with code demonstrating the issue:
https://github.com/sillystring13/cuddly-barnacle/blob/master/Example%20-%20Sklearn%20FAQ%20code%20test.ipynb

The code example needs the parameter 'algorithm=brute' for the the custom distance metric with data indexing to work correctly.  Otherwise, for larger datasets the default 'algorithm=auto' will choose an incompatible algorithm which breaks the custom data indexing.  

notebook with code demonstrating the issue:
https://github.com/sillystring13/cuddly-barnacle/blob/master/Example%20-%20Sklearn%20FAQ%20code%20test.ipynb
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.

1 participant