Categories &

Functions List

Class Definition: PredictiveModel

statistics: PredictiveModel

A fitted model that answers for new observations.

PredictiveModel is the superclass of every classification and regression model in this package that carries a predict method, and of nothing else. The models fitted by fitlm and its relatives derive from it as the learners do. The cross-validated classes answer through kfoldPredict over their folds rather than through predict, and so do not derive from it.

The class is abstract and cannot be instantiated. It is where behaviour shared by all those models is written once rather than once per class, and isa (obj, 'PredictiveModel') is how to ask whether an object is a model that can be told to predict. The only data it holds is the levels a predictor read from a table was coded through, which every model needs to read a table again at prediction and which MATLAB carries by keeping the table itself.

Source Code: PredictiveModel

The PredictiveModel class offers the following public methods:

PredictiveModel: pd = partialDependence (obj, Vars)

PredictiveModel: pd = partialDependence (obj, Vars, Labels)

PredictiveModel: pd = partialDependence (…, Data)

PredictiveModel: pd = partialDependence (…, name, value)

PredictiveModel: [pd, x, y] = partialDependence (…)

partialDependence (obj, Vars) is the same call as partialDependence the function, written on the model instead of before it, and takes and returns exactly what it does. See partialDependence for the arguments and for what pd, x and y hold.

See also: partialDependence, plotPartialDependence