.. _sphx_glr_auto_examples_model_selection: .. _model_selection_examples: Model Selection ----------------------- Examples related to the :mod:`sklearn.model_selection` module. .. raw:: html
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_grid_search_refit_callable_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_grid_search_refit_callable.py` .. raw:: html
Balance model complexity and cross-validated score
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_likelihood_ratios_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_likelihood_ratios.py` .. raw:: html
Class Likelihood Ratios to measure classification performance
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_randomized_search_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_randomized_search.py` .. raw:: html
Comparing randomized search and grid search for hyperparameter estimation
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_successive_halving_heatmap_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_successive_halving_heatmap.py` .. raw:: html
Comparison between grid search and successive halving
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_confusion_matrix_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_confusion_matrix.py` .. raw:: html
Confusion matrix
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_grid_search_digits_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_grid_search_digits.py` .. raw:: html
Custom refit strategy of a grid search with cross-validation
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_multi_metric_evaluation_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_multi_metric_evaluation.py` .. raw:: html
Demonstration of multi-metric evaluation on cross_val_score and GridSearchCV
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_det_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_det.py` .. raw:: html
Detection error tradeoff (DET) curve
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_roc_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_roc.py` .. raw:: html
Multiclass Receiver Operating Characteristic (ROC)
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_nested_cross_validation_iris_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_nested_cross_validation_iris.py` .. raw:: html
Nested versus non-nested cross-validation
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_cv_predict_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_cv_predict.py` .. raw:: html
Plotting Cross-Validated Predictions
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_learning_curve_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_learning_curve.py` .. raw:: html
Plotting Learning Curves and Checking Models' Scalability
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_validation_curve_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_validation_curve.py` .. raw:: html
Plotting Validation Curves
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_precision_recall_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_precision_recall.py` .. raw:: html
Precision-Recall
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_roc_crossval_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_roc_crossval.py` .. raw:: html
Receiver Operating Characteristic (ROC) with cross validation
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_grid_search_text_feature_extraction_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_grid_search_text_feature_extraction.py` .. raw:: html
Sample pipeline for text feature extraction and evaluation
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_grid_search_stats_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_grid_search_stats.py` .. raw:: html
Statistical comparison of models using grid search
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_successive_halving_iterations_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_successive_halving_iterations.py` .. raw:: html
Successive Halving Iterations
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_permutation_tests_for_classification_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_permutation_tests_for_classification.py` .. raw:: html
Test with permutations the significance of a classification score
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_train_error_vs_test_error_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_train_error_vs_test_error.py` .. raw:: html
Train error vs Test error
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_underfitting_overfitting_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_underfitting_overfitting.py` .. raw:: html
Underfitting vs. Overfitting
.. raw:: html
.. only:: html .. image:: /auto_examples/model_selection/images/thumb/sphx_glr_plot_cv_indices_thumb.png :alt: :ref:`sphx_glr_auto_examples_model_selection_plot_cv_indices.py` .. raw:: html
Visualizing cross-validation behavior in scikit-learn
.. raw:: html
.. toctree:: :hidden: /auto_examples/model_selection/plot_grid_search_refit_callable /auto_examples/model_selection/plot_likelihood_ratios /auto_examples/model_selection/plot_randomized_search /auto_examples/model_selection/plot_successive_halving_heatmap /auto_examples/model_selection/plot_confusion_matrix /auto_examples/model_selection/plot_grid_search_digits /auto_examples/model_selection/plot_multi_metric_evaluation /auto_examples/model_selection/plot_det /auto_examples/model_selection/plot_roc /auto_examples/model_selection/plot_nested_cross_validation_iris /auto_examples/model_selection/plot_cv_predict /auto_examples/model_selection/plot_learning_curve /auto_examples/model_selection/plot_validation_curve /auto_examples/model_selection/plot_precision_recall /auto_examples/model_selection/plot_roc_crossval /auto_examples/model_selection/plot_grid_search_text_feature_extraction /auto_examples/model_selection/plot_grid_search_stats /auto_examples/model_selection/plot_successive_halving_iterations /auto_examples/model_selection/plot_permutation_tests_for_classification /auto_examples/model_selection/plot_train_error_vs_test_error /auto_examples/model_selection/plot_underfitting_overfitting /auto_examples/model_selection/plot_cv_indices