.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "checks_gallery/tabular/model_evaluation/plot_regression_systematic_error.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_checks_gallery_tabular_model_evaluation_plot_regression_systematic_error.py: .. _plot_tabular_regression_systematic_error: Regression Systematic Error *************************** .. GENERATED FROM PYTHON SOURCE LINES 10-12 Imports ======= .. GENERATED FROM PYTHON SOURCE LINES 12-20 .. 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 21-23 Generating data =============== .. GENERATED FROM PYTHON SOURCE LINES 23-34 .. 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 35-37 Running RegressionSystematicError check ======================================= .. GENERATED FROM PYTHON SOURCE LINES 37-40 .. code-block:: default check = RegressionSystematicError() .. GENERATED FROM PYTHON SOURCE LINES 41-43 .. code-block:: default check.run(test, clf) .. raw:: html
Regression Systematic Error


.. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.135 seconds) .. _sphx_glr_download_checks_gallery_tabular_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 `_