.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot/plot_adult.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_auto_examples_plot_plot_adult.py: Adult Census Dataset Visualization ==================================== .. GENERATED FROM PYTHON SOURCE LINES 5-15 .. rst-class:: sphx-glr-horizontal * .. image-sg:: /auto_examples/plot/images/sphx_glr_plot_adult_001.png :alt: Target distribution :srcset: /auto_examples/plot/images/sphx_glr_plot_adult_001.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/plot/images/sphx_glr_plot_adult_002.png :alt: Continuous features pairplot :srcset: /auto_examples/plot/images/sphx_glr_plot_adult_002.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/plot/images/sphx_glr_plot_adult_003.png :alt: Discriminating PCA directions, 0.588, Scree plot (PCA explained variance) :srcset: /auto_examples/plot/images/sphx_glr_plot_adult_003.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/plot/images/sphx_glr_plot_adult_004.png :alt: Linear Discriminant :srcset: /auto_examples/plot/images/sphx_glr_plot_adult_004.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/plot/images/sphx_glr_plot_adult_005.png :alt: Categorical Features vs Target, relationship, marital-status, education, education-num, occupation, hours-per-week, gender, workclass, native-country, race :srcset: /auto_examples/plot/images/sphx_glr_plot_adult_005.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out .. code-block:: none /home/circleci/project/dabl/preprocessing.py:172: UserWarning: Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format. pd.to_datetime(series[:10]) /home/circleci/project/dabl/preprocessing.py:172: UserWarning: Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format. pd.to_datetime(series[:10]) /home/circleci/project/dabl/preprocessing.py:172: UserWarning: Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format. pd.to_datetime(series[:10]) /home/circleci/project/dabl/preprocessing.py:172: UserWarning: Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format. pd.to_datetime(series[:10]) /home/circleci/project/dabl/preprocessing.py:172: UserWarning: Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format. pd.to_datetime(series[:10]) /home/circleci/project/dabl/preprocessing.py:172: UserWarning: Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format. pd.to_datetime(series[:10]) /home/circleci/project/dabl/preprocessing.py:172: UserWarning: Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format. pd.to_datetime(series[:10]) Target looks like classification /home/circleci/project/~/miniconda/envs/testenv/lib/python3.11/site-packages/seaborn/categorical.py:641: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning. grouped_vals = vals.groupby(grouper) /home/circleci/project/dabl/plot/utils.py:607: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning. for name, group in data.groupby(target)[column]: /home/circleci/project/dabl/plot/utils.py:607: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning. for name, group in data.groupby(target)[column]: Linear Discriminant Analysis training set score: 0.530 /home/circleci/project/dabl/plot/utils.py:607: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning. for name, group in data.groupby(target)[column]: | .. code-block:: Python # sphinx_gallery_thumbnail_number = 2 from dabl import plot from dabl.datasets import load_adult import matplotlib.pyplot as plt # load the adult census dataset # returns a plain dataframe data = load_adult() plot(data, target_col='income', scatter_alpha=.1) plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 3.162 seconds) .. _sphx_glr_download_auto_examples_plot_plot_adult.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_adult.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_adult.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_