craftml-rs
App Archived
A Rust🦀 implementation of CRAFTML, an Efficient Clustering-based Random Forest for Extreme Multi-label Learning
- Downloads
- Not measured
- Dependents
- Not applicable
- Stars
- 15
- Forks
- 1
- Contributors
- 1
- Commits
- 26
Why Archived
GitHub reports the repository as archived.
Exact rules: Instant archive. The check on applied thresholds version 9.
Every rule outcome, as the check records it
instant-archive: repository is archived
About
A Rust implementation of CRAFTML, an Efficient Clustering-based Random Forest for Extreme Multi-label Learning (Siblini et al., 2018).
Performance
This implementation has been tested on datasets from the Extreme Classification Repository. Each data set comes either with a single data file and separate files for train / test splits, or with two separate train / test data files.
A data file starts with a header line with three space-separated integers: total number of examples, number of features, and number of labels. Following the header line, there is one line per each example, starting with comma-separated labels, followed by space-separated feature:value pairs:
label1,label2,...labelk ft1:ft1_val ft2:ft2_val ft3:ft3_val .. ftd:ftd_val
A split file is a integer matrix, with one line per row, and columns separated by spaces. The integers are example indices (1-indexed) in the corresponding data file, and each column corresponds to a separate split.
Precisions at 1, 3, and 5 are calculated for models trained with default hyper-parameters, e.g.
Read the full README
craftml train Mediamill/data.txt --cv_splits_path Mediamill/train_split.txtfor Mediamill, which has a single data file and separate train / test split files;craftml train EURLex-4K/train.txt --test_data EURLex-4K/test.txtfor EURLex-4K, which has separate train / test data files.
| Dataset | P@1 | P@3 | P@5 |
|---|---|---|---|
| Mediamill | 85.51 | 69.94 | 56.39 |
| Bibtex | 61.47 | 37.20 | 27.32 |
| Delicious | 67.78 | 62.15 | 57.63 |
| EURLex-4K | 79.52 | 66.42 | 55.25 |
| Wiki10-31K | 83.57 | 72.69 | 63.65 |
| WikiLSHTC-325K | 51.79 | 32.41 | 23.43 |
| Delicious-200K | 47.34 | 40.85 | 37.67 |
| Amazon-670K | 38.40 | 34.21 | 31.41 |
| AmazonCat-13K | 92.88 | 77.48 | 61.32 |
These numbers are generally consistent with those reported in the original paper.
Note that if there isn't enough memory to train on a large data set, the --test_trees_singly flag can be set to only train & test one tree at a time, and discard each tree when it's been tested. This allows one to obtain test results without being able to fit the entire model in memory. One can also tune the --centroid_preserve_ratio option to trade off between model size and accuracy.
Build
The project can be easily built with Cargo:
$ cargo build --release
The compiled binary file will be available at target/release/craftml.
Usage
$ craftml train --help
craftml-train
Train a new CRAFTML model
USAGE:
craftml train [FLAGS] [OPTIONS] <training_data>
FLAGS:
-h, --help Prints help information
--test_trees_singly Test forest tree by tree, freeing each before training the next to reduce memory usage.
Model cannot be saved.
-V, --version Prints version information
OPTIONS:
--centroid_min_n_preserve <centroid_min_n_preserve>
The minimum number of entries to preserve from puning, regardless preserve ratio setting. [default: 10]
--centroid_preserve_ratio <centroid_preserve_ratio>
A real number between 0 and 1, which is the ratio of entries with largest absoulte values to preserve. The
rest of the entries are pruned. [default: 0.1]
--cluster_sample_size <cluster_sample_size>
Number of examples drawn for clustering on a branching node [default: 20000]
--cv_splits_path <PATH>
Path to the k-fold cross validation splits file, with k space-separated columns of indices (starting from 1)
for training splits.
--k_clusters <k_clusters> Number of clusters on a branching node [default: 10]
--leaf_max_size <leaf_max_size>
Maximum number of distinct examples on a leaf node [default: 10]
--model_path <PATH> Path to which the trained model will be saved if provided
--n_cluster_iters <n_cluster_iters>
Number of clustering iterations to run on each branching node [default: 2]
--n_feature_buckets <n_feature_buckets>
Number of buckets into which features are hashed [default: 10000]
--n_label_buckets <n_label_buckets>
Number of buckets into which labels are hashed [default: 10000]
--n_threads <n_threads>
Number of worker threads. If 0, the number is selected automatically. [default: 0]
--n_trees <n_trees> Number of trees in the random forest [default: 50]
--out_path <PATH>
Path to the which predictions will be written, if provided
--test_data <PATH>
Path to test dataset file used to calculate metrics if provided (in the format of the Extreme Classification
Repository)
ARGS:
<training_data> Path to training dataset file (in the format of the Extreme Classification Repository)
$ craftml test --help
craftml-test
Test an existing CRAFTML model
USAGE:
craftml test [OPTIONS] <model_path> <test_data>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--k_top <k_top> Number of top predictions to write out for each test example [default: 5]
--n_threads <n_threads> Number of worker threads. If 0, the number is selected automatically. [default: 0]
--out_path <PATH> Path to the which predictions will be written, if provided
ARGS:
<model_path> Path to the trained model
<test_data> Path to test dataset file (in the format of the Extreme Classification Repository)
References
- Siblini, W., Kuntz, P., & Meyer, F. (2018). CRAFTML, an Efficient Clustering-based Random Forest for Extreme Multi-label Learning. In Proceedings of the 35th International Conference on Machine Learning (Vol. 80, pp. 4664–4673). Stockholmsmässan, Stockholm Sweden: PMLR. http://proceedings.mlr.press/v80/siblini18a.html
Compatibility
- License
- MIT
- Crate facts
- Not measured
- Runs on, Native code and Python bindings read crates on crates.io. This entry lists no crate.
Compare with similar projects
Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.
| Project | Downloads | Dependents | Stars | Latest release | Runs on (GPU) | Native code | License |
|---|---|---|---|---|---|---|---|
|
A Rust🦀 implementation of CRAFTML, an Efficient Clustering-based Random Forest for Extreme Multi-label Learning |
Not measured | Not applicable | 15 | Not measured | Not measured | Not measured | MIT |
|
linfa Featured
A Machine Learning framework for Rust |
177,963 downloads over 30 days | 60 | 4,770 | 0.8.1 | GPU support unknown | Binds native code: lapack-sys (feature intel-mkl-static) | Apache-2.0 OR MIT |
|
smartcore Featured
Machine Learning in Rust. |
39,473 downloads over 30 days | 33 | 976 | 0.7.0 | GPU support unknown | No native code found | Apache-2.0 |
|
A Rust implementation of the Leiden algorithm for community detection in large networks. |
1,765 downloads over 30 days | 1 | 1 | 0.1.0 | GPU support unknown | No native code found | MIT |
|
A machine learning package for Rust. |
578 downloads over 30 days | 2 | 647 | 0.5.0 | GPU support unknown | Binds native code: libsvm | Apache-2.0 |
|
treeboost Listed
Gradient-boosted decision trees for tabular data: trains a baseline model in one call, with full control over boosting modes and configs, and Scalar, AVX-512, SVE2, WGPU and CUDA backends. Python bindings |
18 downloads over 30 days | 0 | 9 | 0.1.2 | CUDA, WebGPU | No native code found | Apache-2.0 |
|
Rust implementation of real-coded genetic algorithm for solving optimization problems and training of neural networks. The latter is also known as neuroevolution. |
9 downloads over 30 days | 0 | 20 | 0.2.1 | GPU support unknown | No native code found | GPL-3.0 |
Measurements and sources
Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.
Sources4 sources
- Description: the GitHub repository description
- GitHub repository, fetched
- GitHub releases, fetched
- GitHub contributors, fetched
AdoptionNot measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | Not measured | Yes | ||
| New dependents (365 days) | Not measured | Yes | ||
| Peak active dependents | Not measured | Yes | ||
| Active dependents as a share of the peak | Not measured | Yes | ||
| Binary downloads per release | Not measured | Yes |
MaintenanceLatest human commit: 7 years ago8 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2019-03-19 | GitHub repository | Yes | |
| Latest release | Not measured | Yes | ||
| First release | Not measured | Yes | ||
| Latest version | Not measured | Yes | ||
| Days the oldest outside issue waits for a reply | 0 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 0 | GitHub repository | Yes | |
| Repository archived | true | GitHub repository | Yes | |
| Repository gone | false | GitHub repository | Yes | |
| Release commit or manifest in the repo | Not measured | Yes | ||
| Published docs | Not measured | Yes | ||
| Latest release fails cargo check | Not measured | Yes | ||
| Build check date | Not measured | Yes | ||
| Build check toolchain | Not measured | Yes |
SecurityNot measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Unpatched vulnerabilities past the grace window | Not measured | Yes | ||
| RustSec unmaintained advisory | Not measured | Yes | ||
| Deprecation notice | Not measured | Yes | ||
| Deprecated requirement | Not measured | Yes |
Distribution0 binary downloads over the last 3 releases10 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | Not measured | Yes | ||
| Downloads over 30 days | Not measured | Yes | ||
| Binary downloads over the last 3 releases | 0 | GitHub releases | Yes | |
| Homebrew installs on request over 365 days | Not measured | Yes | ||
| Repology repository families | Not measured | Yes | ||
| Docker pull growth over 90 days | Not measured | Yes | ||
| Docker pulls at the growth baseline | Not measured | Yes | ||
| Every version a prerelease | Not measured | Yes | ||
| Every version 0.0.x | Not measured | Yes | ||
| Every version yanked | Not measured | Yes | ||
| Crate deleted from crates.io | Not measured | Yes |
Repository15 stars, 1 forks, 1 contributors, 26 commits. Stars alone never qualify a project.1 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 15 | GitHub repository | Yes — one part of the repository route | |
| GitHub forks | 1 | GitHub repository | Yes — one part of the repository route | |
| Contributors with a GitHub account | 1 | GitHub contributors | Yes — one part of the repository route | |
| Commits on the default branch | 26 | GitHub repository | No | |
| Repository's main crate left out of the entry | Not measured | Yes |
Facts that never count
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| License | MIT | GitHub repository | No | |
| Runs on, from listed crates and their direct dependencies | Not measured | No | ||
| What shows each backend | Not measured | No | ||
| Native code, from listed crates and their dependencies | Not measured | No | ||
| Python bindings, from direct dependencies of listed crates | Not measured | No | ||
| Crates that depend on a listed crate directly | Not measured | No |
Corrections and review history
No correction applies to this entry.
Judgments
A judgment enters only through an approved issue and a merged pull request.
No judgment applies to this entry.