Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Feature extraction by using sparse filtering

`Mdl = sparsefilt(X,q)`

`Mdl = sparsefilt(X,q,Name,Value)`

returns
a sparse filtering model object that contains the results from applying
sparse filtering to the table or matrix of predictor data `Mdl`

= sparsefilt(`X`

,`q`

)`X`

containing *p* variables. `q`

is
the number of features to extract from `X`

, therefore `sparsefilt`

learns
a *p*-by-`q`

matrix of transformation
weights. For undercomplete or overcomplete feature representations, `q`

can
be less than or greater than the number of predictor variables, respectively.

To access the learned transformation weights, use

`Mdl.TransformWeights`

.To transform

`X`

to the new set of features by using the learned transformation, pass`Mdl`

and`X`

to`transform`

.

uses
additional options specified by one or more `Mdl`

= sparsefilt(`X`

,`q`

,`Name,Value`

)`Name,Value`

pair
arguments. For example, you can standardize the predictor data or
apply *L*^{2} regularization.

The `sparsefilt`

function creates a nonlinear
transformation of input features to output features. The transformation
is based on optimizing an objective function that encourages the representation
of each example by as few output features as possible while at the
same time keeping the output features equally active across examples.

For details, see Sparse Filtering Algorithm.