在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:dillondaudert/UMAP.jl开源软件地址:https://github.com/dillondaudert/UMAP.jl开源编程语言:Julia 93.8%开源软件介绍:UMAP.jlA pure Julia implementation of the Uniform Manifold Approximation and Projection dimension reduction algorithm
Usageembedding = umap(X, n_components; n_neighbors, metric, min_dist, ...) The
The returned Using precomputed distancesUMAP can use a precomputed distance matrix instead of finding the nearest neighbors itself. In this case, the distance matrix is passed as embedding = umap(distances, n_components; metric=:precomputed) Fitting a UMAP model to a dataset and transforming new dataConstructing a modelTo construct a model to use for embedding new data, use the constructor: model = UMAP_(X, n_components; <kwargs>) where the constructor takes the same keyword arguments (kwargs) as model.graph # The graph of fuzzy simplicial set membership strengths of each point in the dataset
model.embedding # The embedding of the dataset
model.data # A reference to the original dataset
model.knns # A matrix of indices of nearest neighbors of points in the dataset,
# as determined on the original manifold (may be approximate)
model.dists # The distances of the neighbors indicated by model.knns Embedding new dataTo transform new data into the existing embedding of a UMAP model, use the Q_embedding = transform(model, Q; <kwargs>) where The remaining keyword arguments (kwargs) are the same as for above functions. Implementation DetailsThere are two main steps involved in UMAP: building a weighted graph with edges connecting points to their nearest neighbors, and optimizing the low-dimensional embedding of that graph. The first step is accomplished either by an exact kNN search (for datasets with The low-dimensional embedding is initialized (by default) with the eigenvectors of the normalized Laplacian of the kNN graph. These are found using ARPACK (via Arpack.jl). Current Limitations
External Resources
ExamplesThe full MNIST and FMNIST datasets are plotted below using both this implementation and the Python implementation for comparison. These were generated by this notebook. Note that the memory allocation for the Python UMAP is unreliable, as Julia's benchmarking doesn't count memory allocated within Python itself. MNISTFMNISTDisclaimerThis implementation is a work-in-progress. If you encounter any issues, please create an issue or make a pull request. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论