Predicts response(s) for the provided sample(s)
[results,f] = model.predict(samples)
[...] = model.predict(..., 'OptionName', optionValue, ...)
Input
- samples Input row vectors (one or more) stored as rows of
a floating-point matrix.
Output
- results Output labels or regression values.
- f The same as the response of the first sample.
Options
- Flags The optional predict flags, model-dependent. For
convenience, you can set the individual flag options below,
instead of directly setting bits here. default 0
- RawOutput makes the method return the raw results (the
sum), not the class label. default false
- CompressedInput compressed data, containing only the
active samples/variables. default false
- PreprocessedInput This parameter is normally set to false,
implying a regular input. If it is true, the method assumes
that all the values of the discrete input variables have been
already normalized to 0..NCategories ranges since the decision
tree uses such normalized representation internally. It is
useful for faster prediction with tree ensembles. For ordered
input variables, the flag is not used. Default false
- PredictAuto Setting this to true, overrides all of the
other
Predict*
flags. It automatically chooses between
PredictSum
and PredictMaxVote
(if the model is a regressor
or the number of classes are 2 with RawOutput
set then it
picks PredictSum
, otherwise it picks PredictMaxVote
by
default). default true
- PredictSum If true then return sum of votes instead of the
class label. default false
- PredictMaxVote If true then return the class label with
the max vote. default false
The method runs the sample through the trees in the ensemble and
returns the output class label based on the weighted voting.