Feature extraction by using reconstruction ICA
Mdl = rica(X,q)
Mdl = rica(X,q,Name,Value)
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
X to the new set
of features by using the learned transformation, pass
ReconstructionICA object by using the
caltech101 image patches.
data = load('caltech101patches'); size(data.X)
ans = 1×2 100000 363
There are 100,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
comma-separated pairs of
the argument name and
Value is the corresponding value.
Name must appear inside quotes. You can specify several name and value
pair arguments in any order as
Mdl = rica(X,q,'IterationLimit',200,'Standardize',true)runs
ricawith optimization iterations limited to 200 and standardized predictor data.
'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
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-
qvector of ±1
Non-Gaussianity of sources, specified as a length-
NonGaussianityIndicator(k) = 1 means
kth source as super-Gaussian, with a sharp
peak at 0.
NonGaussianityIndicator(k) = -1 means
kth source as sub-Gaussian.
Mdl— Learned reconstruction ICA model
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.