Answers for "cross val score scoring options"

0

cross val score scoring options

# sklearn cross_val_score scoring options

# For Regression
'explained_variance'
'max_error'
'neg_mean_absolute_error'
'neg_mean_squared_error'
'neg_root_mean_squared_error'
'neg_mean_squared_log_error'
'neg_median_absolute_error'
'r2'
'neg_mean_poisson_deviance'
'neg_mean_gamma_deviance'
'neg_mean_absolute_percentage_error'

# For Classification
'accuracy'
'balanced_accuracy'
'top_k_accuracy'
'average_precision'
'neg_brier_score'
'f1'
'f1_micro'
'f1_macro'
'f1_weighted'
'f1_samples'
'neg_log_loss'
'precision' 
'recall' 
'jaccard' 
'roc_auc'
'roc_auc_ovr'
'roc_auc_ovo'
'roc_auc_ovr_weighted'
'roc_auc_ovo_weighted'

# For Clustering
'adjusted_mutual info score'
'adjusted_rand_score'
'completeness_score'
'fowlkes_mallows_score'
'homogeneity_score'
'mutual_info_score'
'normalized_mutual_info_score'
'rand_score'
'v_measure_score'
Posted by: Guest on August-17-2021
0

cross_val_score scoring parameters types

>>> from sklearn import svm, cross_validation, datasets
>>> iris = datasets.load_iris()
>>> X, y = iris.data, iris.target
>>> model = svm.SVC()
>>> cross_validation.cross_val_score(model, X, y, scoring='wrong_choice')
Traceback (most recent call last):
ValueError: 'wrong_choice' is not a valid scoring value. Valid options are ['accuracy', 'adjusted_rand_score', 'average_precision', 'f1', 'log_loss', 'mean_absolute_error', 'mean_squared_error', 'precision', 'r2', 'recall', 'roc_auc']
Posted by: Guest on September-06-2020

Code answers related to "cross val score scoring options"

Python Answers by Framework

Browse Popular Code Answers by Language