templateKernel
Kernel learner template
Description
returns a kernel learner
template suitable for training a Gaussian kernel model for nonlinear classification or
regression.t
= templateKernel
returns a template with additional options specified by one or more name-value arguments. t
= templateKernel(Name,Value
)
For example, you can specify the learner or the number of dimensions of the expanded space.
If you specify the type of model by using the Type
name-value
argument, then the display of t
in the Command Window shows all options
as empty ([]
), except those that you specify using name-value arguments.
If you do not specify the type of model, then the display suppresses the empty options.
During training, the software uses default values for empty options.
Examples
Name-Value Arguments
Output Arguments
More About
Algorithms
templateKernel
minimizes the regularized objective function using a Limited-memory Broyden-Fletcher-Goldfarb-Shanno (LBFGS) solver with ridge (L2) regularization. To find the type of LBFGS solver used for training, type FitInfo.Solver
in the Command Window.
'LBFGS-fast'
— LBFGS solver.'LBFGS-blockwise'
— LBFGS solver with a block-wise strategy. IftemplateKernel
requires more memory than the value ofBlockSize
to hold the transformed predictor data, then the function uses a block-wise strategy.'LBFGS-tall'
— LBFGS solver with a block-wise strategy for tall arrays.
When templateKernel
uses a block-wise strategy, it implements LBFGS by
distributing the calculation of the loss and gradient among different parts of the data at
each iteration. Also, templateKernel
refines the initial estimates of the
linear coefficients and the bias term by fitting the model locally to parts of the data and
combining the coefficients by averaging. If you specify 'Verbose',1
, then
templateKernel
displays diagnostic information for each data pass and
stores the information in the History
field of
FitInfo
.
When templateKernel
does not use a block-wise strategy, the initial estimates are zeros. If you specify 'Verbose',1
, then templateKernel
displays diagnostic information for each iteration and stores the information in the History
field of FitInfo
.
References
[3] Huang, P. S., H. Avron, T. N. Sainath, V. Sindhwani, and B. Ramabhadran. “Kernel methods match Deep Neural Networks on TIMIT.” 2014 IEEE International Conference on Acoustics, Speech and Signal Processing. 2014, pp. 205–209.
Extended Capabilities
Version History
Introduced in R2018bSee Also
ClassificationKernel
| RegressionKernel
| fitckernel
| fitrkernel
| fitcecoc