.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "tabular/auto_checks/train_test_validation/plot_new_category_train_test.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_train_test_validation_plot_new_category_train_test.py: .. _tabular__new_category: New Category ************ .. GENERATED FROM PYTHON SOURCE LINES 10-16 .. code-block:: default import pandas as pd from deepchecks.tabular import Dataset from deepchecks.tabular.checks import NewCategoryTrainTest .. GENERATED FROM PYTHON SOURCE LINES 17-23 .. code-block:: default train_data = {"col1": ["somebody", "once", "told", "me"] * 10} test_data = {"col1": ["the","world","is", "gonna", "role", "me","I", "I"] * 10} train = Dataset(pd.DataFrame(data=train_data), cat_features=["col1"]) test = Dataset(pd.DataFrame(data=test_data), cat_features=["col1"]) .. GENERATED FROM PYTHON SOURCE LINES 24-27 .. code-block:: default NewCategoryTrainTest().run(train, test) .. raw:: html
New Category Train Test


.. GENERATED FROM PYTHON SOURCE LINES 28-34 .. code-block:: default train_data = {"col1": ["a", "b", "a", "c"] * 10, "col2": ['a','b','b','q']*10} test_data = {"col1": ["a","b","d"] * 10, "col2": ['a', '2', '1']*10} train = Dataset(pd.DataFrame(data=train_data), cat_features=["col1","col2"]) test = Dataset(pd.DataFrame(data=test_data), cat_features=["col1", "col2"]) .. GENERATED FROM PYTHON SOURCE LINES 35-37 .. code-block:: default NewCategoryTrainTest().run(train, test) .. raw:: html
New Category Train Test


.. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.033 seconds) .. _sphx_glr_download_tabular_auto_checks_train_test_validation_plot_new_category_train_test.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_new_category_train_test.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_new_category_train_test.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_