Compute partial dependence
computes the partial dependence pd
= partialDependence(RegressionMdl
,Vars
)pd
between the predictor variables
listed in Vars
and the responses predicted by using the regression
model RegressionMdl
, which contains predictor data.
computes the partial dependence pd
= partialDependence(ClassificationMdl
,Vars
,Labels
)pd
between the predictor variables
listed in Vars
and the scores for the classes specified in
Labels
by using the classification model
ClassificationMdl
, which contains predictor data.
uses additional options specified by one or more name-value pair arguments. For example,
if you specify pd
= partialDependence(___,Name,Value
)'UseParallel','true'
, the
partialDependence
function uses parallel computing to perform the
partial dependence calculations.
partialDependence
uses a predict
function to
predict responses or scores. partialDependence
chooses the proper
predict
function according to the model
(RegressionMdl
or ClassificationMdl
) and runs
predict
with its default settings. For details about each
predict
function, see the predict
functions in the
following two tables. If the specified model is a tree-based model (not including a boosted
ensemble of trees), then partialDependence
uses the weighted traversal
algorithm instead of the predict
function. For details, see Weighted Traversal Algorithm.
Regression Model Object
Model Type | Full or Compact Regression Model Object | Function to Predict Responses |
---|---|---|
Bootstrap aggregation for ensemble of decision trees | CompactTreeBagger | predict |
Bootstrap aggregation for ensemble of decision trees | TreeBagger | predict |
Ensemble of regression models | RegressionEnsemble , RegressionBaggedEnsemble , CompactRegressionEnsemble | predict |
Gaussian kernel regression model using random feature expansion | RegressionKernel | predict |
Gaussian process regression | RegressionGP , CompactRegressionGP | predict |
Generalized additive model | RegressionGAM , CompactRegressionGAM | predict |
Generalized linear mixed-effect model | GeneralizedLinearMixedModel | predict |
Generalized linear model | GeneralizedLinearModel , CompactGeneralizedLinearModel | predict |
Linear mixed-effect model | LinearMixedModel | predict |
Linear regression | LinearModel , CompactLinearModel | predict |
Linear regression for high-dimensional data | RegressionLinear | predict |
Neural network regression model | RegressionNeuralNetwork , CompactRegressionNeuralNetwork | predict |
Nonlinear regression | NonLinearModel | predict |
Regression tree | RegressionTree , CompactRegressionTree | predict |
Support vector machine | RegressionSVM , CompactRegressionSVM | predict |
Classification Model Object
plotPartialDependence
computes and plots partial dependence values. The
function can also create individual conditional
expectation (ICE) plots.
[2] Hastie, Trevor, Robert Tibshirani, and Jerome Friedman. The Elements of Statistical Learning. New York, NY: Springer New York, 2009.
lime
| oobPermutedPredictorImportance
| plotPartialDependence
| predictorImportance (RegressionEnsemble)
| predictorImportance (RegressionTree)
| relieff
| sequentialfs
| shapley