Giter Site home page Giter Site logo

Comments (3)

jlmelville avatar jlmelville commented on June 8, 2024

@ratheraarif a few months ago at lmcinnes/umap#58 (comment) you asked for the ability to combine the fuzzy simplicial sets/graphs in R. The development version of uwot now has simplicial_set_intersect and simplicial_set_union to combine UMAP graphs, and follows the __mul__ and __add__ operators (but without doing any optimization of low dimensional coordinates).

It will appear in the next CRAN version if you don't want to install from github. Roughly, the R equivalent of the Python code you gave would be:

graph1 <- similarity_graph(X_reduced, n_neighbors = 93)
graph2 <- similarity_graph(Y_reduced, n_neighbors = 93)
intersection <- simplicial_set_intersect(graph1, graph2, weight = 0.45)

embedding <- optimize_graph_layout(intersection , X = X_reduced, min_dist = 1, init = "random", n_epochs = 1000)

You don't need to call reset_local_connectivity because the intersection/union operations do that for you. Note also that most of the initialization and optimization options that you provided in the UMAP constructor example have no effect on the result because the low dimensional output isn't used in the intersection.

from uwot.

ratheraarif avatar ratheraarif commented on June 8, 2024

😊 Will surely give it a try. It was hard for me to go back and forth from Python to R for doing such analysis.

Thanks

from uwot.

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.