Project Overview: Scholar
Scholar is a cutting-edge tool that takes traditional machine learning instruments and supports them with the powerful Nx platform. This project focuses on delivering a suite of algorithms tailored for various machine learning tasks, including classification, regression, clustering, dimensionality reduction, metrics, and preprocessing.
Deep Learning and Complementary Tools
While Scholar provides robust tools for non-deep learning machine learning processes, it acknowledges the growing importance of deep learning by referring users to Axon, a specialized deep learning project. For those interested in decision trees and forests, Scholar recommends the EXGBoost library as a valuable resource.
How to Install Scholar
Installation in Mix Projects
-
Add Scholar to your
mix.exs
file:def deps do [ {:scholar, "~> 0.3.0"} ] end
-
To enhance Scholar's functionality, you might want to incorporate an existing Nx compiler/backend like EXLA:
def deps do [ {:scholar, "~> 0.3.0"}, {:exla, ">= 0.0.0"} ] end
-
In
config/config.exs
, configure the backend as follows:import Config config :nx, :default_backend, EXLA.Backend config :nx, :default_defn_options, [compiler: EXLA, client: :host]
Important Note: Many algorithms within Scholar are optimized using Just-In-Time (JIT) compilation. It's critical to specify
default_defn_options
to utilize this benefit efficiently. If it is not possible to set a defaultdefn
compiler, functions can be explicitly JIT-compiled, such asEXLA.jit(&Scholar.Cluster.AffinityPropagation.fit/1)
.
Installation in Notebooks
For those using code notebooks, Scholar can be installed and set up with the following commands:
-
Execute installation:
Mix.install([ {:scholar, "~> 0.3.0"}, {:exla, ">= 0.0.0"} ])
-
Set the default backend and compiler options:
Nx.global_default_backend(EXLA.Backend) Nx.Defn.global_default_options(compiler: EXLA, client: :host)
Important Note: As with mix projects, ensuring that the
Nx.Defn.global_default_options/1
is set is crucial for memory efficiency during algorithm execution with JIT compilation.
Licensing
Scholar is developed under the auspices of the Machine Learning Working Group of the Erlang Ecosystem Foundation. It is released under the Apache License, Version 2.0. Users are encouraged to review the licensing agreement to understand the terms and conditions of using Scholar in various applications.
By tapping into the strength of Nx, Scholar empowers developers and data scientists to execute complex machine learning tasks with higher performance and efficiency, providing a reliable and scalable solution in various machine learning domains.