.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "tabular/auto_checks/model_evaluation/plot_regression_systematic_error.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_tabular_auto_checks_model_evaluation_plot_regression_systematic_error.py: .. _tabular__regression_systematic_error: Regression Systematic Error *************************** This notebook provides an overview for using and understanding the Regression Systematic Error check. **This check is deprecated and will be removed in future versions**, please use the :ref:`tabular__regression_error_distribution` check instead. **Structure:** * `What is the the Regression Systematic Error check? <#what-is-the-regression-systematic-error-check>`__ * `Generate data & model <#generate-data-model>`__ * `Run the check <#run-the-check>`__ What is the Regression Systematic Error check? ================================================== The ``RegressionSystematicError`` check looks for a systematic error in model predictions. If the errors distribution is non-zero mean, it indicates the presence of a systematic error. .. GENERATED FROM PYTHON SOURCE LINES 27-29 Imports ======= .. GENERATED FROM PYTHON SOURCE LINES 29-37 .. code-block:: default from sklearn.datasets import load_diabetes from sklearn.ensemble import GradientBoostingRegressor from sklearn.model_selection import train_test_split from deepchecks.tabular import Dataset from deepchecks.tabular.checks import RegressionSystematicError .. GENERATED FROM PYTHON SOURCE LINES 38-40 Generate data & model ====================== .. GENERATED FROM PYTHON SOURCE LINES 40-51 .. code-block:: default diabetes_df = load_diabetes(return_X_y=False, as_frame=True).frame train_df, test_df = train_test_split(diabetes_df, test_size=0.33, random_state=42) train_df['target'] = train_df['target'] + 150 train = Dataset(train_df, label='target', cat_features=['sex']) test = Dataset(test_df, label='target', cat_features=['sex']) clf = GradientBoostingRegressor(random_state=0) _ = clf.fit(train.data[train.features], train.data[train.label_name]) .. GENERATED FROM PYTHON SOURCE LINES 52-54 Run the check ============== .. GENERATED FROM PYTHON SOURCE LINES 54-57 .. code-block:: default check = RegressionSystematicError() check.run(test, clf) .. rst-class:: sphx-glr-script-out .. code-block:: none /home/runner/work/deepchecks/deepchecks/docs/source/checks/tabular/model_evaluation/plot_regression_systematic_error.py:55: DeprecationWarning: RegressionSystematicError check is deprecated and will be removed in future version, please use RegressionErrorDistribution check instead. .. raw:: html
Regression Systematic Error


.. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.139 seconds) .. _sphx_glr_download_tabular_auto_checks_model_evaluation_plot_regression_systematic_error.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_regression_systematic_error.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_regression_systematic_error.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_