Machine Learning Pocket Reference by Matt Harrison

Machine Learning Pocket Reference by Matt Harrison

Author:Matt Harrison
Language: eng
Format: epub
Publisher: O'Reilly Media
Published: 2019-09-03T16:00:00+00:00


>>> from yellowbrick.model_selection import ( ... ValidationCurve, ... ) >>> fig, ax = plt.subplots(figsize=(6, 4)) >>> vc_viz = ValidationCurve( ... RandomForestClassifier(n_estimators=100), ... param_name="max_depth", ... param_range=np.arange(1, 11), ... cv=10, ... n_jobs=-1, ... ) >>> vc_viz.fit(X, y) >>> vc_viz.poof() >>> fig.savefig("images/mlpr_1101.png", dpi=300)

Figure 11-1. Validation curve report.

The ValidationCurve class supports a scoring parameter. The parameter can be a custom function or one of the following options, depending on the task.

Classification scoring options include: 'accuracy', 'average_precision', 'f1', 'f1_micro', 'f1_macro', 'f1_weighted', 'f1_samples', 'neg_log_loss', 'precision', 'recall', and 'roc_auc'.

Clustering scoring options: 'adjusted_mutual_info_score', 'adjusted_rand_score', 'completeness_score', 'fowlkesmallows_score', 'homogeneity_score', 'mutual_info_score', 'normalized_mutual_info_score', and 'v_measure_score'.

Regression scoring options: 'explained_variance', 'neg_mean_absolute_error', 'neg_mean_squared_error', 'neg_mean_squared_log_error', 'neg_median_absolute_error', and 'r2'.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.