Main Content

Compute partial dependence

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 `Mdl`

and runs
`predict`

with its default settings. For details about each
`predict`

function, see the `predict`

functions in the
following two tables. If `Mdl`

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 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` |

Nonlinear regression | `NonLinearModel` | `predict` |

Regression tree | `RegressionTree` , `CompactRegressionTree` | `predict` |

Support vector machine regression | `RegressionSVM` , `CompactRegressionSVM` | `predict` |

**Classification Model Object**

Model Type | Full or Compact Classification Model Object | Function to Predict Labels and Scores |
---|---|---|

Discriminant analysis classifier | `ClassificationDiscriminant` ,
`CompactClassificationDiscriminant` | `predict` |

Multiclass model for support vector machines or other classifiers | `ClassificationECOC` , `CompactClassificationECOC` | `predict` |

Ensemble of learners for classification | `ClassificationEnsemble` , `CompactClassificationEnsemble` ,
`ClassificationBaggedEnsemble` | `predict` |

Gaussian kernel classification model using random feature expansion | `ClassificationKernel` | `predict` |

k-nearest neighbor classifier | `ClassificationKNN` | `predict` |

Linear classification model | `ClassificationLinear` | `predict` |

Multiclass naive Bayes model | `ClassificationNaiveBayes` , `CompactClassificationNaiveBayes` | `predict` |

Support vector machine classifier for one-class and binary classification | `ClassificationSVM` , `CompactClassificationSVM` | `predict` |

Binary decision tree for multiclass classification | `ClassificationTree` , `CompactClassificationTree` | `predict` |

Bagged ensemble of decision trees | `TreeBagger` , `CompactTreeBagger` | `predict` |

`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`