Geoscience Reference
In-Depth Information
class labels
classes
. h e layers of
cls
can be listed by typing
cls
resulting in the output
cls =
ClassificationDiscriminant
PredictorNames: {'x1' 'x2'}
ResponseName: 'Y'
ClassNames: [3x9 char]
ScoreTransform: 'none'
NObservations: 180
DiscrimType: 'linear'
Mu: [3x2 double]
Coeffs: [3x3 struct]
h e meaning of most i elds in this output is obvious, except for
ScoreTransform
which is either a function handle for transforming scores or a string
representing a built-in transformation function. We are not using the score
transform which is why it is set to
none
. h e i eld
Mu
contains the means of
the two variables from the three classes. h e 3-by-3 structure
Coeffs
of the
three classes contains the coei cients of the linear classii cation boundaries
between classes 1 and 2, and between classes 2 and 3. Typing
cls.Coeffs
results in the output
ans =
3x3 struct array with fields:
DiscrimType
Const
Linear
Class1
Class2
which lists the discriminant type (
linear
in our example), the class names
of the pairs of classes
i
and
j
, and the two parameters
Const
and
Linear
describing the classii cation boundaries separating the two pairs of classes.
We can extract the parameters of the classii cation boundaries by typing
K1 = cls.Coeffs(2,3).Const;
L1 = cls.Coeffs(2,3).Linear;
K2 = cls.Coeffs(1,2).Const;
L2 = cls.Coeffs(1,2).Linear;
and store them in new variables
K1
,
L1
,
K2
and
L2
. We then store the bivariate
means by typing