predict
R2026bSyntax
Description
specifies whether to perform computations in parallel.labels = predict(mdl,X,UseParallel=UseParallel)
[ also returns a matrix of classification scores
indicating the likelihood that a label comes from a particular class, using any of the input
argument combinations in the previous syntaxes. For each observation in
labels,scores]
= predict(___)X, the predicted class label corresponds to the maximum score among all
classes.
Examples
Input Arguments
Output Arguments
Alternative Functionality
Simulink Block
To integrate the prediction of an XGBoost classification model into Simulink®, you can use the RegressionNeuralNetwork
Predict block in the Statistics and Machine Learning Toolbox™ library or a MATLAB Function block with the predict function. For example,
see Predict Class Labels Using MATLAB Function Block.
When deciding which approach to use, consider the following:
If you use the Statistics and Machine Learning Toolbox library block, you can use the Fixed-Point Tool (Fixed-Point Designer) to convert a floating-point model to fixed point.
Support for variable-size arrays must be enabled for a MATLAB Function block with the
predictfunction.If you use a MATLAB Function block, you can use MATLAB functions for preprocessing or post-processing before or after predictions in the same MATLAB Function block.
Extended Capabilities
Version History
Introduced in R2026aSee Also
CompactClassificationXGBoost | importModelFromXGBoost | loss | margin | edge