ClassificationPartitionedECOC
statistics: ClassificationPartitionedECOC
A cross-validated multiclass model built from binary learners.
Each fold holds out part of the data, fits an error correcting output codes model on the rest, and answers the part it held out, so every observation is classified by a model that never saw it.
It comes from crossval on a ClassificationECOC, and from
fitcecoc given any of 'KFold', 'Holdout',
'Leaveout' or 'CVPartition'.
This is the one cross-validated class in the package that is not the
general ClassificationPartitionedModel. It carries
CodingMatrix, BinaryLoss and BinaryY, three things
the general class has nowhere to put and without which a fold’s scores
cannot be decoded at all.
See also: fitcecoc, ClassificationECOC, CompactClassificationECOC
Source Code: ClassificationPartitionedECOC
The ClassificationPartitionedECOC class contains the following properties:
A cell column with one CompactClassificationECOC per fold, the
training data having no place in a model that only ever answers the
rows it did not see. This property is read-only.
The ClassificationPartitionedECOC class offers the following public methods:
ClassificationPartitionedECOC: label = kfoldPredict (obj)
ClassificationPartitionedECOC: [label, NegLoss] = kfoldPredict (obj)
Each observation is classified by the fold that held it out, so the
labels are out-of-sample. An observation no fold held out, which
under a holdout partition is most of them, comes back missing rather
than classified, and its NegLoss row comes back NaN.
See also: ClassificationPartitionedECOC, CompactClassificationECOC.predict
ClassificationPartitionedECOC: m = kfoldMargin (obj)
See also: ClassificationPartitionedECOC.kfoldPredict, ClassificationPartitionedECOC.kfoldEdge
ClassificationPartitionedECOC: e = kfoldEdge (obj)
ClassificationPartitionedECOC: L = kfoldLoss (obj)
ClassificationPartitionedECOC: L = kfoldLoss (…, name, value)
| Name | Value | |
|---|---|---|
'LossFun' | 'classiferror' (default),
'classifcost', 'mincost', 'binodeviance',
'exponential', 'hinge', 'logit' or
'quadratic'. |
ClassificationPartitionedECOC: vals = kfoldfun (obj, fun)
fun is called once per fold as
fun (CMdl, Xtrain, Ytrain, Wtrain,
Xtest, Ytest, Wtest) and must return a numeric row
of the same length every time. vals has one row per fold.