机器学习
findcloud
这个作者很懒,什么都没留下…
展开
-
CART回归树源码_python+numpy
CART回归树源码_python+numpy总结代码如下(示例):#philchen CART_regressionimport 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 · 1329 阅读 · 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 · 2658 阅读 · 0 评论