Skip to content

[MRG+2] convert to boolean arrays for boolean distances (ex: jaccard) - #5460

Closed
TomDLT wants to merge 1 commit into
scikit-learn:masterfrom
TomDLT:jaccard
Closed

TomDLT wants to merge 1 commit into
scikit-learn:masterfrom
TomDLT:jaccard

Conversation

@TomDLT

@TomDLT TomDLT commented Oct 19, 2015 •

Copy link
Copy Markdown
Member

Comment thread sklearn/metrics/pairwise.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

DataConversionWarning?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sure!

@jakevdp

jakevdp commented Oct 21, 2015

Copy link
Copy Markdown
Member

Looks good. We'd want some regression tests that check the behavior for non-boolean inputs.

@TomDLT TomDLT changed the title [WIP] jaccard distance [MRG] jaccard distance Oct 22, 2015
@TomDLT TomDLT changed the title [MRG] jaccard distance [MRG] convert to boolean arrays for boolean distances (ex: jaccard) Oct 22, 2015
@TomDLT

TomDLT commented Oct 22, 2015

Copy link
Copy Markdown
Member Author

Tests added, that fail on master

@jakevdp

jakevdp commented Oct 22, 2015

Copy link
Copy Markdown
Member

This looks really good. Let's wait for tests to pass.

In the meantime, this will need a CHANGELOG entry, especially because it might change results for certain use cases. Actually, we might even think about having some sort of deprecation cycle for this... what do you think?

@amueller

Copy link
Copy Markdown
Member

I consider this a bugfix, so no deprecation cycle. We do need a whatsnew entry, though

@amueller amueller added this to the 0.18 milestone Dec 10, 2015
@TomDLT

TomDLT commented Dec 11, 2015

Copy link
Copy Markdown
Member Author

whatsnew entry added

@jakevdp

jakevdp commented Dec 11, 2015

Copy link
Copy Markdown
Member

From the diff, it looks like an unrelated section of whatsnew was accidentally deleted in the most recent commit.

@TomDLT

TomDLT commented Dec 12, 2015

Copy link
Copy Markdown
Member Author

This entry was duplicated

@tguillemot

Copy link
Copy Markdown
Contributor

LGTM.
@amueller @jakevdp @raghavrv Another review ?
@TomDLT Could you rebase ?

@TomDLT TomDLT changed the title [MRG] convert to boolean arrays for boolean distances (ex: jaccard) [MRG+1] convert to boolean arrays for boolean distances (ex: jaccard) May 30, 2016
NN = neighbors.NearestNeighbors

nn1 = NN(metric="jaccard", algorithm='brute').fit(X)
nn2 = NN(metric="jaccard", algorithm='ball_tree').fit(X)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1 looks neat

@raghavrv

raghavrv commented Jun 16, 2016 •

Copy link
Copy Markdown
Member

LGTM apart from the minor nitpick! Thx @TomDLT !!

@TomDLT TomDLT changed the title [MRG+1] convert to boolean arrays for boolean distances (ex: jaccard) [MRG+2] convert to boolean arrays for boolean distances (ex: jaccard) Jun 16, 2016
@tguillemot

Copy link
Copy Markdown
Contributor

@TomDLT I think the pb of ci is now corrected by #6897.
Can you check it's ok but as you don't touch the doc, I think it's OK.

@raghavrv

Copy link
Copy Markdown
Member

Yes a rebase and forcepush should trigger re-build of Circle with the fixed configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants