{"id":13475110,"url":"https://github.com/rust-ml/linfa","last_synced_at":"2025-05-14T07:05:30.676Z","repository":{"id":37533438,"uuid":"128170519","full_name":"rust-ml/linfa","owner":"rust-ml","description":"A Rust machine learning framework.","archived":false,"fork":false,"pushed_at":"2025-03-28T09:45:30.000Z","size":4933,"stargazers_count":4121,"open_issues_count":66,"forks_count":270,"subscribers_count":70,"default_branch":"master","last_synced_at":"2025-05-07T06:32:10.910Z","etag":null,"topics":["algorithms","machine-learning","rust","scientific-computing"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rust-ml.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE-APACHE2","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"liberapay":"linfa"}},"created_at":"2018-04-05T07:03:30.000Z","updated_at":"2025-05-06T11:40:10.000Z","dependencies_parsed_at":"2023-12-24T19:26:33.114Z","dependency_job_id":"d620abae-cdb9-4ce6-b92c-f2fde7baf46e","html_url":"https://github.com/rust-ml/linfa","commit_stats":{"total_commits":311,"total_committers":45,"mean_commits":6.911111111111111,"dds":0.7909967845659164,"last_synced_commit":"86ad712fb6696f23e43cbf200d0c7051939f84d3"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-ml%2Flinfa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-ml%2Flinfa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-ml%2Flinfa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-ml%2Flinfa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-ml","download_url":"https://codeload.github.com/rust-ml/linfa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254092647,"owners_count":22013290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","machine-learning","rust","scientific-computing"],"created_at":"2024-07-31T16:01:17.435Z","updated_at":"2025-05-14T07:05:30.621Z","avatar_url":"https://github.com/rust-ml.png","language":"Rust","funding_links":["https://liberapay.com/linfa"],"categories":["Rust","Libraries","Data Science","库 Libraries","Library / Framework","Machine Learning","Programming","Libs With Online Books","Programming Libraries","1. Core Frameworks \u0026 Libraries"],"sub_categories":["Artificial Intelligence","Machine Learning","人工智能 Artificial Intelligence","General-Purpose Machine Learning","Rust 🦀","Philosophy","Rust"],"readme":"\u003cimg align=\"left\" src=\"./mascot.svg\" width=\"70px\" height=\"70px\" alt=\"Linfa mascot icon\"\u003e\n\n# Linfa\n\n[![crates.io](https://img.shields.io/crates/v/linfa.svg)](https://crates.io/crates/linfa)\n[![Documentation](https://docs.rs/linfa/badge.svg)](https://docs.rs/linfa)\n[![DocumentationLatest](https://img.shields.io/badge/docs-latest-blue)](https://rust-ml.github.io/linfa/rustdocs/linfa/)\n[![Codequality](https://github.com/rust-ml/linfa/workflows/Codequality%20Lints/badge.svg)](https://github.com/rust-ml/linfa/actions?query=workflow%3A%22Codequality+Lints%22)\n[![Run Tests](https://github.com/rust-ml/linfa/workflows/Run%20Tests/badge.svg)](https://github.com/rust-ml/linfa/actions?query=workflow%3A%22Run+Tests%22)\n\n\u003e _**linfa**_ (Italian) / _**sap**_ (English):\n\u003e \n\u003e The **vital** circulating fluid of a plant.\n\n\n`linfa` aims to provide a comprehensive toolkit to build Machine Learning applications with Rust.\n\nKin in spirit to Python's `scikit-learn`, it focuses on common preprocessing tasks and classical ML algorithms for your everyday ML tasks.\n\n\u003cstrong\u003e\n    \u003ca href=\"https://rust-ml.github.io/linfa/\"\u003eWebsite\u003c/a\u003e | \u003ca href=\"https://rust-ml.zulipchat.com\"\u003eCommunity chat\u003c/a\u003e\n\u003c/strong\u003e\n\n## Current state\n\nWhere does `linfa` stand right now? [Are we learning yet?](http://www.arewelearningyet.com/)\n\n`linfa` currently provides sub-packages with the following algorithms: \n\n\n| Name | Purpose | Status | Category |  Notes | \n| :--- | :--- | :---| :--- | :---| \n| [clustering](algorithms/linfa-clustering/) | Data clustering | Tested / Benchmarked  | Unsupervised learning | Clustering of unlabeled data; contains K-Means, Gaussian-Mixture-Model, DBSCAN and OPTICS | \n| [kernel](algorithms/linfa-kernel/) | Kernel methods for data transformation  | Tested  | Pre-processing | Maps feature vector into higher-dimensional space| \n| [linear](algorithms/linfa-linear/) | Linear regression | Tested  | Partial fit | Contains Ordinary Least Squares (OLS), Generalized Linear Models (GLM) | \n| [elasticnet](algorithms/linfa-elasticnet/) | Elastic Net | Tested | Supervised learning | Linear regression with elastic net constraints |\n| [logistic](algorithms/linfa-logistic/) | Logistic regression | Tested  | Partial fit | Builds two-class logistic regression models\n| [reduction](algorithms/linfa-reduction/) | Dimensionality reduction | Tested | Pre-processing | Diffusion mapping, Principal Component Analysis (PCA), Random projections |\n| [trees](algorithms/linfa-trees/) | Decision trees | Tested / Benchmarked  | Supervised learning | Linear decision trees\n| [svm](algorithms/linfa-svm/) | Support Vector Machines | Tested  | Supervised learning | Classification or regression analysis of labeled datasets | \n| [hierarchical](algorithms/linfa-hierarchical/) | Agglomerative hierarchical clustering | Tested | Unsupervised learning | Cluster and build hierarchy of clusters |\n| [bayes](algorithms/linfa-bayes/) | Naive Bayes | Tested | Supervised learning | Contains Gaussian Naive Bayes |\n| [ica](algorithms/linfa-ica/) | Independent component analysis | Tested | Unsupervised learning | Contains FastICA implementation |\n| [pls](algorithms/linfa-pls/) | Partial Least Squares | Tested | Supervised learning | Contains PLS estimators for dimensionality reduction and regression |\n| [tsne](algorithms/linfa-tsne/) | Dimensionality reduction| Tested | Unsupervised learning | Contains exact solution and Barnes-Hut approximation t-SNE |\n| [preprocessing](algorithms/linfa-preprocessing/) |Normalization \u0026 Vectorization| Tested / Benchmarked | Pre-processing | Contains data normalization/whitening and count vectorization/tf-idf |\n| [nn](algorithms/linfa-nn/) | Nearest Neighbours \u0026 Distances | Tested / Benchmarked | Pre-processing | Spatial index structures and distance functions |\n| [ftrl](algorithms/linfa-ftrl/) | Follow The Regularized Leader - proximal | Tested  / Benchmarked | Partial fit | Contains L1 and L2 regularization. Possible incremental update |\n\nWe believe that only a significant community effort can nurture, build, and sustain a machine learning ecosystem in Rust - there is no other way forward.\n\nIf this strikes a chord with you, please take a look at the [roadmap](https://github.com/rust-ml/linfa/issues/7) and get involved!\n\n## BLAS/Lapack backend\n\nSome 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`.\n\n|Backend  | Linux | Windows | macOS |\n|:--------|:-----:|:-------:|:-----:|\n|OpenBLAS |✔️      |-        |-      |\n|Netlib   |✔️      |-        |-      |\n|Intel MKL|✔️      |✔️        |✔️      |\n\nEach 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`.\n\nAn 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.\n\n# License\nDual-licensed to be compatible with the Rust project.\n\nLicensed 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-ml%2Flinfa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-ml%2Flinfa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-ml%2Flinfa/lists"}