Feature extraction by using reconstruction ICA
a reconstruction independent component analysis (RICA) model object
that contains the results from applying RICA to the table or matrix
of predictor data
Mdl = rica(
X containing p variables.
the number of features to extract from
q matrix of transformation
weights. For undercomplete or overcomplete feature representations,
be less than or greater than the number of predictor variables, respectively.
To access the learned transformation weights, use
Xto the new set of features by using the learned transformation, pass
Create Reconstruction ICA Object
ReconstructionICA object by using the
SampleImagePatches image patches.
data = load('SampleImagePatches'); size(data.X)
ans = 1×2 5000 363
There are 5,000 image patches, each containing 363 features.
Extract 100 features from the data.
rng default % For reproducibility q = 100; Mdl = rica(data.X,q,'IterationLimit',100)
Warning: Solver LBFGS was not able to converge to a solution.
Mdl = ReconstructionICA ModelParameters: [1x1 struct] NumPredictors: 363 NumLearnedFeatures: 100 Mu:  Sigma:  FitInfo: [1x1 struct] TransformWeights: [363x100 double] InitialTransformWeights:  NonGaussianityIndicator: [100x1 double] Properties, Methods
rica issues a warning because it stopped due to reaching the iteration limit, instead of reaching a step-size limit or a gradient-size limit. You can still use the learned features in the returned object by calling the
Specify optional pairs of arguments as
the argument name and
Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name in quotes.
Mdl = rica(X,q,'IterationLimit',200,'Standardize',true) runs
optimization iterations limited to 200 and standardized predictor
Lambda — Regularization coefficient value
1 (default) | positive numeric scalar
Regularization coefficient value for the transform weight matrix,
specified as the comma-separated pair consisting of
a positive numeric scalar. If you specify
there is no regularization term in the objective function.
ContrastFcn — Contrast function
'logcosh' (default) |
Contrast function, specified as
'sqrt'. The contrast function is a smooth function
that is similar to an absolute value function. The
function contains a term
where g represents the contrast function, the wj are the variables over which the optimization takes place, and the are data.
The three available contrast functions are:
NonGaussianityIndicator — Non-Gaussianity of sources
ones(q,1) (default) | length-
q vector of ±1
Non-Gaussianity of sources, specified as a length-
NonGaussianityIndicator(k) = 1means
kth source as super-Gaussian, with a sharp peak at 0.
NonGaussianityIndicator(k) = -1means
kth source as sub-Gaussian.
Mdl — Learned reconstruction ICA model
ReconstructionICA model object
Learned reconstruction ICA model, returned as a
To access properties of
Mdl, use dot notation.
To access the learned transform weights, use
To access the structure of fitting information, use
rica function creates a linear transformation
of input features to output features. The transformation is based
on optimizing a nonlinear objective function that roughly balances
statistical independence of the output features versus the ability
to reconstruct the input data using the output features.
For details, see Reconstruction ICA Algorithm.
Introduced in R2017a