Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Uniform Manifold Approximation and Projection (UMAP) is a well-known dimensionality reduction method along with t-SNE.
Ruby users often use Rumale for machine learning. t-SNE is included in Rumale, but UMAP is not.
Since the Ruby language is a relatively minor language in the field of data analysis, it is often the case that a library that implements what you want to do does not exist. In such cases, you can look for libraries in languages such as C or Rust to build Ruby bindings. GitHub's search allows you to search for code by language. This can be used to find libraries for C. Since GitHub allows tagging of projects, searching for the target tag can also be helpful. However, UMAP seems to be difficult to implement, and I could not find a C library that implements UMAP. Instead, we found a library that implements UMAP in C++. That is Umappp.
GitHub: https://github.com/kojix2/ruby-umappp
Umappp is a C++ library implemented by Aaron Lun. it is developed based on the R library uwot. it is implemented in C++ and uses OpenMP, so high performance is expected.
There are two ways to write Ruby extensions in C++. One is Rice and the other is extpp. In this case, I used Rice because I wanted to use numo.hpp to link Numo::NArray and C++.
There are two ways to write Ruby extensions in C++. One is Rice and the other is extpp. In this case, I used Rice because I wanted to use numo.hpp to link Numo::NArray and C++.
There are two ways to write Ruby extensions in C++. One is Rice and the other is extpp. In this case, I used Rice because I wanted to use numo.hpp to link Numo::NArray and C++.
There are two ways to write Ruby extensions in C++. One is Rice and the other is extpp. In this case, I used Rice because I wanted to use numo.hpp to link Numo::NArray and C++.