机器学习
findcloud
这个作者很懒,什么都没留下…
展开
-
CART回归树源码_python+numpy
CART回归树源码_python+numpy总结 代码如下(示例): #philchen CART_regression import numpy as np """ function MSE to compute the mean square error """ def MSE(x,y): return np.sum((x - y)**2) """ function CARTReg is for to compute the regression tree inp.原创 2022-02-08 10:56:48 · 1335 阅读 · 0 评论 -
召回率R,精确率P,精度accuracy,F1计算
召回率R,精确率P,精度accuracy,F1计算一、召回率R,精确率P,精度accuracy,F1定义二、使用步骤参考 一、召回率R,精确率P,精度accuracy,F1定义 二、使用步骤 from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score #1表示白球,0表示黑球 y_true = [1, 1, 1, 0, 0, 0, 1, 0, 0, 1] y_pred = [1, 1, 0,原创 2021-12-15 11:13:56 · 2694 阅读 · 0 评论