RADICAL
An implementation of RADICAL, a method for independent component analysis (ICA). Given a dataset, this can decompose the dataset into an unmixing matrix and an independent component matrix. This can be useful for preprocessing.
:- use_module('path/to/.../src/methods/radical/radical.pl').
%% usage example
TrainData = [5.1,3.5,1.4, 4.9,3.0,1.4, 4.7,3.2,1.3, 4.6,3.1,1.5],
radical_initModel(0.175,30,150,0,0),
doRadical(TrainData, 3, Y, _, W, _).
Available Predicates
radical_initModel/5
Initilizes the radical model.
%% predicate definition
radical_initModel(NoiseStdDev, Replicates, Angles, Sweeps, M) :-
NoiseStdDev >= 0,
Replicates > 0,
Angles > 0,
Sweeps >= 0,
initModelI(NoiseStdDev, Replicates, Angles, Sweeps, M).
%% foreign c++ predicate definition
foreign(initModel, c, initModelI(+float32, +integer, +integer, +integer, +integer)).
Parameters
Name | Type | Description | Default |
---|---|---|---|
noiseStdDev | +float | Standard deviation of the Gaussian noise added to the replicates of the data points during Radical2D. | 0.175 |
replicates | +integer | Number of Gaussian-perturbed replicates to use (per point) in Radical2D. | 30 |
angles | +integer | Number of angles to consider in brute-force search during Radical2D. | 150 |
sweeps | +integer | Number of sweeps. Each sweep calls Radical2D once for each pair of dimensions. | 0 |
m | +integer | The variable m from Vasicek's m-spacing estimator of entropy. | 0 |
doRadical/6
Run RADICAL.
%% predicate definition
doRadical(DataList, DataRows, YList, YCols, WList, ZCols) :-
convert_list_to_float_array(DataList, DataRows, array(Xsize, Xrows, X)),
doRadicalI(X, Xsize, Xrows, Y, YCols, YRows, Z, ZCols, ZRows),
convert_float_array_to_2d_list(Y, YCols, YRows, YList),
convert_float_array_to_2d_list(Z, ZCols, ZRows, WList).
%% foreign c++ predicate definition
foreign(doRadical, c, doRadicalI( +pointer(float_array), +integer, +integer,
-pointer(float_array), -integer, -integer,
-pointer(float_array), -integer, -integer)).
Parameters
Name | Type | Description | Default |
---|---|---|---|
X | +matrix | Input data into the algorithm - a matrix where each column is a point and each row is a dimension. | - |
Y | -matrix | Estimated independent components - a matrix where each column is a point and each row is an estimated independent component. | - |
W | -matrix | Estimated unmixing matrix, where Y = W * X. | - |
doRadical2D/3
Two-dimensional version of RADICAL.
%% predicate definition
doRadical2D(DataList, DataRows, Result) :-
convert_list_to_float_array(DataList, DataRows, array(Xsize, Xrows, X)),
doRadical2DI(X, Xsize, Xrows, Result).
%% foreign c++ predicate definition
foreign(doRadical2D, c, doRadical2DI( +pointer(float_array), +integer, +integer,
[-float32])).
Parameters
Name | Type | Description | Default |
---|---|---|---|
X | +matrix | Input data into the algorithm - a matrix where each column is a point and each row is a dimension. | - |
result | -float | - | - |
Connected Links/Resources
If you want a more detailed explanation, then go to the python documentation. There is most of the time a good explanation on how the methods work and what the parameters do.
added some of the links from the python documentation