Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sile/fanova
A Rust implementation of fANOVA (functional analysis of variance)
https://github.com/sile/fanova
fanova feature-importance hyperparameter-importance
Last synced: 2 months ago
JSON representation
A Rust implementation of fANOVA (functional analysis of variance)
- Host: GitHub
- URL: https://github.com/sile/fanova
- Owner: sile
- License: mit
- Created: 2020-05-17T16:25:22.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-07-01T10:09:47.000Z (over 2 years ago)
- Last Synced: 2024-10-12T14:28:43.823Z (3 months ago)
- Topics: fanova, feature-importance, hyperparameter-importance
- Language: Rust
- Homepage:
- Size: 140 KB
- Stars: 14
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
fanova
=======[![fanova](https://img.shields.io/crates/v/fanova.svg)](https://crates.io/crates/fanova)
[![Documentation](https://docs.rs/fanova/badge.svg)](https://docs.rs/fanova)
[![Actions Status](https://github.com/sile/fanova/workflows/CI/badge.svg)](https://github.com/sile/fanova/actions)
[![Coverage Status](https://coveralls.io/repos/github/sile/fanova/badge.svg?branch=master)](https://coveralls.io/github/sile/fanova?branch=master)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)A Rust [fANOVA] (functional analysis of variance) implementation.
fANOVA provides a way to calculate feature importance.
Examples
--------```rust
use fanova::{FanovaOptions, RandomForestOptions};
use rand::{Rng, SeedableRng};let mut feature1 = Vec::new();
let mut feature2 = Vec::new();
let mut feature3 = Vec::new();
let mut target = Vec::new();let mut rng = rand::rngs::StdRng::seed_from_u64(0);
for _ in 0..100 {
let f1 = rng.gen();
let f2 = rng.gen();
let f3 = rng.gen();
let t = f1 + f2 * 2.0 + f3 * 3.0;feature1.push(f1);
feature2.push(f2);
feature3.push(f3);
target.push(t);
}let mut fanova = FanovaOptions::new()
.random_forest(RandomForestOptions::new().seed(0))
.fit(vec![&feature1, &feature2, &feature3], &target).unwrap();
let importances = (0..3)
.map(|i| fanova.quantify_importance(&[i]).mean)
.collect::>();assert_eq!(
importances,
vec![0.02744461966313835, 0.22991883769286145, 0.6288784011550144]
);
```References
----------- [An Efficient Approach for Assessing Hyperparameter Importance][fANOVA]
[fANOVA]: http://proceedings.mlr.press/v32/hutter14.html