机器学习模型的性能度量(PerMetrics)框架

permetrics的Python项目详细描述


人工智能模型的性能度量(PerMetrics)框架

GitHub releaseDocumentation StatusWheelPyPI versionDOILicense


"Knowledge is power, sharing it is the premise of progress in life. It seems like a burden to someone, but it is the only way to achieve immortality." --- Thieu Nguyen


简介

  • PerMetrics是一个python库,用于机器学习模型的性能度量。在

  • 该框架的目标是:

    • 结合回归、分类和聚类模型的所有指标
    • 帮助所有领域的用户尽快访问指标
    • 对模型进行定性分析。在
    • 对模型进行定量分析。在
  • 指标

ProblemSTTMetricMetric FullnameCharacteristics
Regression1EVSExplained Variance ScoreLarger is better (Best = 1)
2MEMax ErrorSmaller is better (Best = 0)
3MAEMean Absolute ErrorSmaller is better (Best = 0)
4MSEMean Squared ErrorSmaller is better (Best = 0)
5RMSERoot Mean Squared ErrorSmaller is better (Best = 0)
6MSLEMean Squared Log ErrorSmaller is better (Best = 0)
7MedAEMedian Absolute ErrorSmaller is better (Best = 0)
8MREMean Relative ErrorSmaller is better (Best = 0)
9MAPEMean Absolute Percentage ErrorSmaller is better (Best = 0)
10SMAPESymmetric Mean Absolute Percentage ErrorSmaller is better (Best = 0)
11MAAPEMean Arctangent Absolute Percentage ErrorSmaller is better (Best = 0)
12MASEMean Absolute Scaled ErrorSmaller is better (Best = 0)
13NSENash-Sutcliffe Efficiency CoefficientLarger is better (Best = 1)
14WIWillmott IndexLarger is better (Best = 1)
15RPearson’s Correlation IndexLarger is better (Best = 1)
16CIConfidence IndexLarger is better (Best = 1)
17R2Coefficient of DeterminationLarger is better (Best = 1)
18R2s(Pearson’s Correlation Index) ^ 2Larger is better (Best = 1)
19DRVDeviation of Runoff VolumeSmaller is better (Best = 0)
20KGEKling-Gupta EfficiencyLarger is better (Best = 1)
21
Single Loss1RERelative errorSmaller is better (Best = 0)
2AEAbsolute errorSmaller is better (Best = 0)
3SESquared errorSmaller is better (Best = 0)
4SLESquared log errorSmaller is better (Best = 0)
5LLLog likelihoodSmaller is better (Best = 0)
6
Classification1MLLMean Log LikelihoodSmaller is better (Best = 0)
2
Clustering1
2

依赖性

  • Python(>;=3.6)
  • 数量(>;=1.15.1)

用户安装

安装current PyPI release

pip install permetrics

或者从GitHub安装开发版本:

^{pr2}$

示例

  • 你需要做的就是:(确保你的y嫒true和y峎pred是一个numpy数组)
* Simple example:

## For example with RMSE:

    from numpy import array
    from permetrics.regression import Metrics

    ## For 1-D array
    y_true = array([3, -0.5, 2, 7])
    y_pred = array([2.5, 0.0, 2, 8])

    obj1 = Metrics(y_true, y_pred)
    print(obj1.rmse_func(clean=True, decimal=5))

    ## For > 1-D array
    y_true = array([[0.5, 1], [-1, 1], [7, -6]])
    y_pred = array([[0, 2], [-1, 2], [8, -5]])

    multi_outputs = [None, "raw_values", [0.3, 1.2], array([0.5, 0.2]), (0.1, 0.9)]
    obj2 = Metrics(y_true, y_pred)
    for multi_output in multi_outputs:
        print(obj2.rmse_func(clean=False, multi_output=multi_output, decimal=5))

* Or run the simple:
    python examples/RMSE.py

* The more complicated tests in the folder: examples

documentation包含更详细的安装说明和说明。在

变更日志

  • 请参阅ChangeLog.md了解置换术的显著变化历史。在

重要链接

捐款

引文

  • 如果您在项目中使用permetrics,请引用我的作品:
@software{thieu_nguyen_2020_3951205,
  author       = {Thieu Nguyen},
  title        = {A framework of PERformance METRICS (PerMetrics) for artificial intelligence models},
  month        = jul,
  year         = 2020,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.3951205},
  url          = {https://doi.org/10.5281/zenodo.3951205}
}

@article{nguyen2019efficient,
  title={Efficient Time-Series Forecasting Using Neural Network and Opposition-Based Coral Reefs Optimization},
  author={Nguyen, Thieu and Nguyen, Tu and Nguyen, Binh Minh and Nguyen, Giang},
  journal={International Journal of Computational Intelligence Systems},
  volume={12},
  number={2},
  pages={1144--1161},
  year={2019},
  publisher={Atlantis Press}
}

未来工作

分类

  • F1得分
  • 多类测井损失
  • 电梯
  • 二值分类的平均精度
  • 精确性/召回盈亏平衡点
  • 交叉熵
  • 真阳性/假阳性/真阴性/假阴性率
  • 精确性/召回性/敏感性/特异性
  • 相互信息

处理

  • 分组/减少
  • 称重单个样本或组

属性指标可以具有

  • 最小值或最大值(通过最小化或最大化进行优化)
  • 二元分类
    • 分数预测类标签
    • 分数预测排名(最有可能出现在一个班级中的可能性最小)
    • 得分预测概率
  • 多类分类
    • 分数预测类标签
    • 得分预测概率
  • 回归(更多)
  • 离散评分者比较(混淆矩阵)

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Oracle Java:NLS_区域是否足以正确格式化数字?   java开放Api$ref以使用url   如何在java中使用synchronized方法实现线程的同步?   java无法创建JVM Android studio   使用基本Java检查两个字符串是否是彼此的字谜   spring:如何将java安全配置转换为yml   java如何扩展任何移动服务提供商的SMSC?   如何转换java。util。日期到soap支持的日期格式“yyyyMMdd'T'HH:mm:ss”,带区域id   java Hibernate:中间关系   java从main中的其他类调用方法   java找出由两个长历元值表示的两个日期之间的差异   java更新cloudera quickstart vm以使用java7   java jOOQ将字符串转换为布尔值   java定制Android Spinner XML w/SpinnerAdapter?