rust-ml/linfa

Rust

A Rust machine learning framework.

machine-learningrustalgorithmsscientific-computing
Star 增长趋势
Star
4.7k
Forks
337
周增长
+6
Issues
53
2k4k
2019年11月2022年2月2024年5月2026年9月
制品库crates.io
README
Linfa mascot icon

Linfa

crates.io Documentation DocumentationLatest Codequality Run Tests

linfa (Italian) / sap (English):

The vital circulating fluid of a plant.

linfa aims to provide a comprehensive toolkit to build Machine Learning applications with Rust.

Kin in spirit to Python's scikit-learn, it focuses on common preprocessing tasks and classical ML algorithms for your everyday ML tasks.

Website | Community chat

Current state

Where does linfa stand right now? Are we learning yet?

linfa currently provides sub-packages with the following algorithms:

Name Purpose Status Category Notes
bayes Naive Bayes Tested Supervised learning Contains Bernouilli, Gaussian and Multinomial Naive Bayes
clustering Data clustering Tested / Benchmarked Unsupervised learning Clustering of unlabeled data; contains K-Means, Gaussian-Mixture-Model, DBSCAN and OPTICS
ensemble Ensemble methods Tested Supervised learning Contains bagging, random forest and AdaBoost
elasticnet Elastic Net Tested Supervised learning Linear regression with elastic net constraints
ftrl Follow The Regularized Leader - proximal Tested / Benchmarked Partial fit Contains L1 and L2 regularization. Possible incremental update
hierarchical Agglomerative hierarchical clustering Tested Unsupervised learning Cluster and build hierarchy of clusters
ica Independent component analysis Tested Unsupervised learning Contains FastICA implementation
kernel Kernel methods for data transformation Tested Pre-processing Maps feature vector into higher-dimensional space
lars Linear regression Tested Supervised learning Contains Least Angle Regression (LARS)
linear Linear regression Tested Supervised learning Contains Ordinary Least Squares (OLS), Generalized Linear Models (GLM)
logistic Logistic regression Tested Partial fit Builds two-class logistic regression models
nn Nearest Neighbours & Distances Tested / Benchmarked Pre-processing Spatial index structures and distance functions
pls Partial Least Squares Tested Supervised learning Contains PLS estimators for dimensionality reduction and regression
preprocessing Normalization & Vectorization Tested / Benchmarked Pre-processing Contains data normalization/whitening and count vectorization/tf-idf
reduction Dimensionality reduction Tested Pre-processing Diffusion mapping, Principal Component Analysis (PCA), Random projections
svm Support Vector Machines Tested Supervised learning Classification or regression analysis of labeled datasets
trees Decision trees Tested / Benchmarked Supervised learning Linear decision trees
tsne Dimensionality reduction Tested Unsupervised learning Contains exact solution and Barnes-Hut approximation t-SNE

We believe that only a significant community effort can nurture, build, and sustain a machine learning ecosystem in Rust - there is no other way forward.

If this strikes a chord with you, please take a look at the roadmap and get involved!

Browser WASM

For browser-style WASM on wasm32-unknown-unknown, enable linfa's wasm-bindgen feature.

BLAS/Lapack backend

Some algorithm crates need to use an external library for linear algebra routines. By default, we use a pure-Rust implementation. However, you can also choose an external BLAS/LAPACK backend library instead, by enabling the blas feature and a feature corresponding to your BLAS backend. Currently you can choose between the following BLAS/LAPACK backends: openblas, netblas or intel-mkl.

Backend Linux Windows macOS
OpenBLAS ✔️ - -
Netlib ✔️ - -
Intel MKL ✔️ ✔️ ✔️

Each BLAS backend has two features available. The feature allows you to choose between linking the BLAS library in your system or statically building the library. For example, the features for the intel-mkl backend are intel-mkl-static and intel-mkl-system.

An example set of Cargo flags for enabling the Intel MKL backend on an algorithm crate is --features blas,linfa/intel-mkl-system. Note that the BLAS backend features are defined on the linfa crate, and should only be specified for the final executable.

License

Dual-licensed to be compatible with the Rust project.

Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.

相关仓库
tensorflow/tensorflow

An Open Source Machine Learning Framework for Everyone

C++Apache License 2.0tensorflowmachine-learning
tensorflow.org
199.3k76.3k
f/prompts.chat

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

HTMLawesomeOtherchatgptai
prompts.chat
169.7k21.8k
huggingface/transformers

🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.

PythonPyPIApache License 2.0nlpnatural-language-processing
huggingface.co/transformers
165k34.5k
rasbt/LLMs-from-scratch

Implement a ChatGPT-like LLM in PyTorch from scratch, step by step

Jupyter NotebookOthergptlarge-language-models
amzn.to/4fqvn0D
104.6k16k
pytorch/pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration

PythonPyPIOtherneural-networkautograd
pytorch.org
102.9k29.2k
microsoft/ML-For-Beginners

12 weeks, 26 lessons, 52 quizzes, classic Machine Learning for all

Jupyter NotebooktutorialMIT Licensemldata-science
90.3k22.2k
Developer-Y/cs-video-courses

List of Computer Science courses with video lectures.

computer-sciencealgorithms
83.4k11.5k
mlabonne/llm-course

Course to get into Large Language Models (LLMs) with roadmaps and Colab notebooks.

tutorialApache License 2.0coursellm
mlabonne.github.io/blog/
82.4k9.6k
netdata/netdata

The fastest path to AI-powered full stack observability, even for lean teams.

GoGo ModulesGNU General Public License v3.0monitoringdocker
netdata.cloud
80.5k6.6k
d2l-ai/d2l-zh

《动手学深度学习》:面向中文读者、能运行、可讨论。中英文版被70多个国家的500多所大学用于教学。

PythonPyPItutorialApache License 2.0deep-learningbook
zh.d2l.ai
80.4k12.4k
tesseract-ocr/tesseract

Tesseract Open Source OCR Engine (main repository)

C++Apache License 2.0tesseracttesseract-ocr
tesseract-ocr.github.io
76.4k10.8k
binhnguyennus/awesome-scalability

The Patterns of Scalable, Reliable, and Performant Large-Scale Systems

awesomeMIT Licensesystem-designbackend
73.8k7.1k