2 个版本

使用旧的 Rust 2015

0.1.1 2018年5月27日
0.1.0 2018年5月27日

#707 in 机器学习

MIT 许可证

9KB
66

Deeprust 代码库

Rust 中的机器学习库

安装包

cargo install deeprust

或者你也可以在 Cargo.toml 依赖部分提及库名来安装它

基本示例

  1. 导入库
extern crate deeprust;
  1. 根据你要构建的应用程序使用可用的 API,例如,我想获取我的模型性能的混淆矩阵
#[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());
 
}

有关 API 的更多详细信息,请参阅官方文档。那里有更多示例

本地设置项目

  1. 克隆仓库
// Downloading the project
git clone https://github.com/dvigneshwer/deeprust
cd to_proj_dir
cd ./code/deeprust
  1. 运行构建脚本
bash ./build_project.sh

附加信息

  • 要了解所有实现的数学细节,请查看这个链接

  • 如果你是 Rust 语言的新手,请随意查看rust 训练目录

  • 遇到任何问题或发现项目中的问题,或者你有反馈,请随意提出问题

  • 我们一直在寻找贡献者,查看问题部分并加入团队

无运行时依赖