err = cvshrink(obj)
[err,gamma]
= cvshrink(obj)
[err,gamma,delta]
= cvshrink(obj)
[err,gamma,delta,numpred]
= cvshrink(obj)
[err,...] = cvshrink(obj,Name,Value)
returns
a vector of crossvalidated classification error values for differing
values of the regularization parameter Gamma.err
= cvshrink(obj
)
[
also returns the vector
of Gamma values.err
,gamma
]
= cvshrink(obj
)
[
also returns the vector
of Delta values.err
,gamma
,delta
]
= cvshrink(obj
)
[
returns the vector
of number of nonzero predictors for each setting of the parameters
Gamma and Delta.err
,gamma
,delta
,numpred
]
= cvshrink(obj
)
[
cross
validates with additional options specified by one or more err
,...] = cvshrink(obj
,Name,Value
)Name,Value
pair
arguments.

Discriminant analysis classifier, produced using 
Specify optional commaseparated pairs of Name,Value
arguments.
Name
is the argument
name and Value
is the corresponding
value. Name
must appear
inside single quotes (' '
).
You can specify several name and value pair
arguments in any order as Name1,Value1,...,NameN,ValueN
.

Default: 

Vector of Gamma values for crossvalidation. Default: 

Number of Delta intervals for crossvalidation. For every value
of Gamma, Default: 

Number of Gamma intervals for crossvalidation. Default: 

Verbosity level, an integer from Default: 

Numeric vector or matrix of errors.


Vector of Gamma values used for regularization. See Gamma and Delta. 

Vector or matrix of Delta values used for regularization. See Gamma and Delta.


Numeric vector or matrix containing the number of predictors
in the model at various regularizations.

Examine the err
and numpred
outputs
to see the tradeoff between crossvalidated error and number of predictors.
When you find a satisfactory point, set the corresponding gamma
and delta
properties
in the model using dot notation. For example, if (i,j)
is
the location of the satisfactory point, set
obj.Gamma = gamma(i); obj.Delta = delta(i,j);