Crates.io | deep_rust |
lib.rs | deep_rust |
version | 0.1.1 |
source | src |
created_at | 2018-05-27 16:04:20.729877 |
updated_at | 2018-05-27 16:08:35.607217 |
description | Machine learning crate in Rust (under dev) |
homepage | |
repository | https://github.com/dvigneshwer/deeprust |
max_upload_size | |
id | 67302 |
size | 11,687 |
Machine learning crate in Rust
cargo install deeprust
or alternatively you could install it by mentioning the library name in the Cargo.toml dependecies section
extern crate deeprust;
#[macro_use(Confusionmatrix)]
extern crate deeprust;
use deeprust::metrics::confusion_matrix;
fn main() {
// assigning random values to the confusion matrix
let sample = Confusionmatrix!(100,50,10,5);
println!("The total predictions {}", sample.total());
// Calculating the accuracy of the model
println!("Accuracy of the model {:.2}", sample.accuracy());
// Calculating the precision of the model
println!("Precision of the model {:.2}", sample.precision());
// Calculating the true positive rate of the model
println!("True positive rate of the model {:.2}",
sample.true_poitive_rate());
// Calculating the false positive rate of the model
println!("False positive rate of the model {:.2}",
sample.false_positive_rate());
// Calculating the misclassification rate of the model
println!("Misclassification rate of the model {:.2}",
sample.misclassification_rate());
// Calculating the specificity of the model
println!("Specificity of the model {:.2}", sample.specificity());
// Calculating the prevalance of the model
println!("Prevalance of the model {:.2}", sample.prevalance());
}
For more details on the API's head over to the official documentation There are more examples over there
// Downloading the project
git clone https://github.com/dvigneshwer/deeprust
cd to_proj_dir
cd ./code/deeprust
bash ./build_project.sh
To get a mathematical gist of all the implementation here, check out this link
If you are new to Rust language, please feel free to checkout the rust training dir
Stuck at any place or spotted an issue with the project or do you have a feedback, feel free to to raise an issue
We are always looking for contributors,checkout the issue section & join the gang