model=LinearRegression() model.fit(data_x,data_y) print(model.coef_) #y=0.1*x+0.3 coef_ 对应0.1, intercept对应0.3 print(model.intercept_) print(model.get_params()) #{'copy_X': True, 'fit_intercept': True, 'n_jobs': 1, 'normalize': False} print(model.score(data_x,data_y)) #R^2 coefficient of determination
https://blog.csdn.net/qq5q13638/article/details/78379817算法
Accuracy:准确度,app
Sensitivity(tpr):敏感度,这个的计算方式是dom
Specificity:特异度机器学习
Positive predictive value 阳性结果中真阳性的比率函数
Negative predictive value:阴性预测值
Brier Score:能够理解成判断结果与真实结果的平均距离吧~距离越小代表结果越好学习
AUC:Area Under roc Cure ,越大越好
这个概念能够是数据挖掘或者机器学习中较为重要的指标之一(甚至比accuracy还要更加剧要一些),其字面意思就是在ROC曲线下面的面积atom
机器学习过程当中,构建策略后,相同代码、数据,每次回测结果不一致,且差异很大,是什么缘由?该如何处理?spa
https://zhuanlan.zhihu.com/p/27787096 .net
评估机器学习模型的稳定性(Stability)和评估机器学习的表现(Performance)有本质上的不一样,不能简单的经过评估准确率这种指标来讲一个机器学习稳定与否。举个最简单的例子,假设一个模型一下子表现特别好,一下子比较特别差,咱们敢用这个模型于实际生产中吗?说白了,稳定性仍是因为数据的方差Variance决定。code
那么有小伙伴说了,咱们或许能够用交叉验证(cross-validation)来评估一个算法模型的稳定性。没错这是个正确的思路,但最大的问题,就是交叉验证太慢了
解答:一样数据,用svm回测,学习100个月,预测100多个月,每次结果不一致,有一些差异
是由于每次y是随机产生的,致使结果不一致。
pipeline model_selection linear_model base calibration cluster covariance cross_decomposition 交叉分解
datasets decomposition discriminant_analysis 判别分析 dummy ensemble exceptions externals
feature_extraction feature_selection gaussian_process grid_search isotonic kernel_approximation (核近似,模块基于傅立叶变换实现了几个近似核函数图)
kernel_ridge learning_curve manifold metrics mixture multiclass multioutput naive_bayes neighbors neural_network
preprocessing random_projection semi_supervised setup svm tests tree utils
import sklearn dir(sklearn) Out[3]: [ 'base','clone','config_context', 'exceptions','externals', 'get_config', 'logger', 'logging', 'os', 're', 'set_config', 'setup_module', 'sys', 'utils', 'warnings'