Coder Social home page Coder Social logo

Comments (7)

ZhenyiWangTHU avatar ZhenyiWangTHU commented on May 24, 2024

Hah, results are reasonable. Because sNN only calculates the number of shared nearest neighbors of points are in each others snn list. This function is fast and powerful. Thank you for your contribution!

from dbscan.

ZhenyiWangTHU avatar ZhenyiWangTHU commented on May 24, 2024

I interpreted the meaning of sNN() function as above, but I'm not very sure about it. If I was wrong, please let me know. Thank you :)

from dbscan.

mhahsler avatar mhahsler commented on May 24, 2024

Thank you for the bug report. I have found a problem in the code that computes the shared NN similarity. I have fixed the code on GitHub. The fix will be part of the next release on CRAN.

from dbscan.

ZhenyiWangTHU avatar ZhenyiWangTHU commented on May 24, 2024

Thank you for the bug report. I have found a problem in the code that computes the shared NN similarity. I have fixed the code on GitHub. The fix will be part of the next release on CRAN.

Hi Michael, thank you for your quick response! I tried your new code using the example above and get the result is
test_res$shared[3,]
5 4 5 2 2
This result is correct, but I think the result before is also correct. Because old version sNN only calculates the number of shared NN of points are in each others sNN list. If two points are not in each other's snn list, the similarity of them will be 0. The new version one calculates all k nearest neighbor's shared NN similarity and return them. Namely, even two point are not in each other's snn list, if their k nearest neighbors are intersected, the similarity of them will be the number of the intersection but not 0.
Hah, I actually need the old version function in my algorithm. Thanks again!

from dbscan.

mhahsler avatar mhahsler commented on May 24, 2024

I had to go back to the sNN clustering paper to clear this up and decided to implement both versions by providing the parameter jp. If jp is TRUE the sNN will use the definition by Javis and Patrick (1973), where shared neighbors are only counted between points that are in each other's neighborhood, otherwise, 0 is returned. If FALSE, then the number of shared neighbors is returned, even if the points are not neighbors.

Let me know it this works for you.

from dbscan.

ZhenyiWangTHU avatar ZhenyiWangTHU commented on May 24, 2024

I had to go back to the sNN clustering paper to clear this up and decided to implement both versions by providing the parameter jp. If jp is TRUE the sNN will use the definition by Javis and Patrick (1973), where shared neighbors are only counted between points that are in each other's neighborhood, otherwise, 0 is returned. If FALSE, then the number of shared neighbors is returned, even if the points are not neighbors.

Let me know it this works for you.

This works for me, cheers! I think both versions are very useful for different researchers. Thanks a million for your nice work!

from dbscan.

mhahsler avatar mhahsler commented on May 24, 2024

Great!

from dbscan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.