rica
statistics: Mdl = rica (X, Q)
statistics: Mdl = rica (X, Q, Name, Value)
Reconstruction independent component analysis (RICA) for feature extraction.
Mdl = rica (X, Q) learns Q features from the
data matrix X (rows are observations, columns are
predictors) and returns a ReconstructionICA object Mdl. Apply
the learned transformation to data with transform (Mdl, X),
which returns X * Mdl.TransformWeights.
The weight matrix (with unit-length columns) minimizes the objective
Lambda * ||X * W * W' - X||_F^2
+ sum (sum (g (X * W)))
|
over the transformation weights W, combining a reconstruction cost with
a sparsity contrast g applied elementwise and selected by
'ContrastFcn'.
Name/Value pairs:
'IterationLimit''Lambda''Standardize'false).'ContrastFcn''logcosh' (default), which is
; 'exp', which is
; or 'sqrt', which is
, a smooth stand-in for .'InitialTransformWeights''GradientTolerance', 'StepTolerance'1e-6 each). They govern the fit only under
'Solver', 'lbfgs'; the 'quasinewton' solver runs to its own
tighter internal tolerances and records these without acting on them.'Solver''quasinewton' (default) minimizes through Octave’s fminunc,
which carries a full inverse Hessian. 'lbfgs' selects the
limited-memory BFGS solver MATLAB uses, holding as many curvature pairs as
the transform has parameters, and is several times faster here. It stops
where 'GradientTolerance' and 'StepTolerance' say to, so a
value tighter than the default carries it further. The RICA objective is not convex and is minimized by a quasi-Newton solver, so
the learned weights depend on the starting point and the solver, and are only
defined up to a permutation and sign of the feature columns. Different runs
(or different software, including MATLAB) may return different weights that
nonetheless describe an equally valid feature transformation. Fix
'InitialTransformWeights' for a reproducible result.
See also: ReconstructionICA, sparsefilt, pca
Source Code: rica
Learn two features from data with the default (random) start.
X = [1, 2, 3, 4; 2, 3, 4, 5; -1, 0, 1, 2; 3, 1, 4, 1; 0, 2, 1, 3]; Mdl = rica (X, 2, "IterationLimit", 200); Z = transform (Mdl, X)
Z = -5.4695 0.1853 -7.3347 -0.3226 -1.7392 1.2012 -3.9338 -3.3743 -3.4565 1.3492