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
Enable precomputed similarity matrices #87
Conversation
Clustering functions such as `DBSCAN` accept `metric='precomputed'`, which requires a square distance (similarity) matrix to be passed as, in this case, `inverse_X`. However, the mapper isn't aware when precomputed matrices are being passed in, so when it slices according to the filter function values and hypercubes, the square-ness is un-squared. This PR adds a kludgey way to tell the mapper that a precomputed matrix is being passed in. When set to `True`, the slice will feed a square matrix to `clusterer.fit()`
Hello @deargle, Thank you for updating !
Comment last updated on May 21, 2018 at 21:02 Hours UTC |
Codecov Report
@@ Coverage Diff @@
## master #87 +/- ##
==========================================
- Coverage 82.15% 81.84% -0.32%
==========================================
Files 6 6
Lines 409 413 +4
Branches 95 96 +1
==========================================
+ Hits 336 338 +2
- Misses 51 52 +1
- Partials 22 23 +1
Continue to review full report at Codecov.
|
Hey! Thanks for this PR. There were some variable name changes. Could you please resolve the conflicts and add a couple of unit tests showing that it works and is equivalent to the typical method? |
Oh, you're welcome! I hadn't written the unit tests yet, but I'll still do
that as a separate PR soon.
…On Thu, Jul 12, 2018, 6:36 PM Nathaniel Saul ***@***.***> wrote:
Merged #87 <#87>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#87 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABHsfV5BHqrW8NyCDC1nxkIV0RGuwgoEks5uF895gaJpZM4UHmwV>
.
|
Great, Thanks! Please notice some of the variable names have changed! |
Clustering functions such as
DBSCAN
acceptmetric='precomputed'
, which requires a square distance (dissimilarity) matrix. However, the mapper isn't aware whenprecomputed matrices are being passed in, so when it slices according to the filter function values and hypercubes, the square-ness is un-squared.
This PR adds a kludgey way to tell the mapper that a precomputed matrix
is being passed in. When set to
True
, the slice will feed a squarematrix to
clusterer.fit()