margin
Classification margins
Syntax
M = margin(ens,tbl,ResponseVarName)
M = margin(ens,tbl,Y)
M = margin(ens,X,Y)
M = margin(___Name,Value)
Description
returns the classification margin for the predictions of M
= margin(ens
,tbl
,ResponseVarName
)ens
on data
tbl
, when the true classifications are
tbl.ResponseVarName
.
returns the classification margin for the predictions of M
= margin(ens
,tbl
,Y
)ens
on data
tbl
, when the true classifications are
Y
.
returns the classification margin for the predictions of M
= margin(ens
,X
,Y
)ens
on data
X
, when the true classifications are Y
.
calculates margin with additional options specified by one or more
M
= margin(___Name,Value
)Name,Value
pair arguments, using any of the previous
syntaxes.
Input Arguments
|
Classification ensemble created with |
|
Sample data, specified as a table. Each row of If you trained |
|
Response variable name, specified as the name of a variable in
You must specify |
|
Matrix of data to classify. Each row of If you trained |
|
Class labels of observations in |
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
| Indices of weak learners in the ensemble ranging from Default: |
|
A logical matrix of size When Default: |
| Indication to perform inference in parallel, specified as Default: |
Output Arguments
|
A numeric column vector with the same number of rows as
|