機器學習_ML_模型評估
原文連結在使用GridViewCV或是cross_val_score做模型評估的時候,總是會需要我們做scoring的設定,好做效能指標!(另一篇混洧矩陣也記得閱讀)

各種的數值計算都跟上面這張圖有關。(取自(維基百科))
SCIKIT-LEARN
下面的表格取自SCIKIT-LEARN,已經有幫我們做好各種類型演算法的模型評估的LIB了。配上上圖的說明,可以很快速的了解各種模型評估的數值來源。
| Scoring | Function | Comment |
|---|---|---|
| Classification | ||
| accuracy | accuracy_score | |
| average_precision | average_precision_score | |
| f1 | f1_score | for binary targets |
| f1_micro | f1_score | micro-averaged |
| f1_macro | f1_score | macro-averaged |
| f1_weighted | f1_score | weighted average |
| f1_samples | f1_score | by multilabel sample |
| neg_log_loss | log_loss | requires predict_proba support |
| precision etc. | precision_score | suffixes apply as with f1 |
| recall etc. | recall_score | suffixes apply as with f1 |
| roc_auc | roc_auc_score | |
| Clustering | ||
| adjusted_mutual_info_score | adjusted_mutual_info_score | |
| adjusted_rand_score | adjusted_rand_score | |
| completeness_score | completeness_score | |
| fowlkes_mallows_score | fowlkes_mallows_score | |
| homogeneity_score | homogeneity_score | |
| mutual_info_score | mutual_info_score | |
| normalized_mutual_info_score | normalized_mutual_info_score | |
| v_measure_score | v_measure_score | |
| Regression | ||
| explained_variance | explained_variance_score | |
| neg_mean_absolute_error | mean_absolute_error | |
| neg_mean_squared_error | mean_squared_error | |
| neg_mean_squared_log_error | mean_squared_log_error | |
| neg_median_absolute_error | median_absolute_error | |
| r2 | r2_score |
沒有留言:
張貼留言