.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "checks_gallery/tabular/integrity/plot_new_label_train_test.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_integrity_plot_new_label_train_test.py: New Label ********* .. GENERATED FROM PYTHON SOURCE LINES 8-14 .. code-block:: default import pandas as pd from deepchecks.tabular import Dataset from deepchecks.tabular.checks.integrity import NewLabelTrainTest .. GENERATED FROM PYTHON SOURCE LINES 15-21 .. code-block:: default test_data = {"col1": [0, 1, 2, 3] * 10} val_data = {"col1": [4, 5, 6, 7, 8, 9] * 10} test = Dataset(pd.DataFrame(data=test_data), label="col1", label_type="classification_label") val = Dataset(pd.DataFrame(data=val_data), label="col1", label_type="classification_label") .. GENERATED FROM PYTHON SOURCE LINES 22-28 .. code-block:: default test_data = {"col1": ["a", "b", "a", "c"] * 10, "col2": [1,2,2,3]*10} val_data = {"col1": ["a","b","d"] * 10, "col2": [1, 4, 5]*10} test = Dataset(pd.DataFrame(data=test_data), label="col2", label_type="classification_label") val = Dataset(pd.DataFrame(data=val_data), label="col2", label_type="classification_label") .. GENERATED FROM PYTHON SOURCE LINES 29-30 .. code-block:: default NewLabelTrainTest().run(test, val) .. raw:: html

New Label Train Test

Find new labels in test.

Additional Outputs
  Percent new labels in sample New labels
Label column    
col2 66.67% [4, 5]


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