plot_partial_dependence
Plot the partial dependence of features. The partial dependence of a feature (or a set of features) corresponds to the response of the model for each possible value of the feature. Two-way partial dependence plots are plotted as contour plots (only allowed for single model plots). The deciles of the feature values will be shown with tick marks on the x-axes for one-way plots, and on both axes for two-way plots. Read more about partial dependence on sklearn's documentation.
Parameters: |
models: str, sequence or None, optional (default=None)
columns: int, str, sequence or None, optional (default=None)
This parameter is ignored when plotting feature pairs.
target: int or str, optional (default=1)
title: str or None, optional (default=None)
figsize: tuple, optional (default=(10, 6))
filename: str or None, optional (default=None)
display: bool or None, optional (default=True) |
Returns: |
matplotlib.figure.Figure Plot object. Only returned if display=None .
|
Example
from atom import ATOMClassifier
atom = ATOMClassifier(X, y)
atom.feature_selection(strategy="PCA", n_features=6)
atom.run(["Tree", "Bag"], metric="precision")
atom.plot_partial_dependence()
atom.tree.plot_partial_dependence(features=(4, (3, 4)))