>>> from mlpack import radical
An implementation of RADICAL, a method for independentcomponent analysis (ICA). Assuming that we have an input matrix X, thegoal is to find a square unmixing matrix W such that Y = W * X and the dimensions of Y are independent components. If the algorithm is runningparticularly slowly, try reducing the number of replicates.
The input matrix to perform ICA on should be specified with the 'input' parameter. The output matrix Y may be saved with the 'output_ic' output parameter, and the output unmixing matrix W may be saved with the 'output_unmixing' output parameter.
For example, to perform ICA on the matrix 'X' with 40 replicates, saving the independent components to 'ic', the following command may be used:
>>> output = radical(input=X, replicates=40)
>>> ic = output['output_ic']
- input (numpy matrix or arraylike, float dtype): [required] Input dataset for ICA.
- angles (int): Number of angles to consider in brute-force search during Radical2D. Default value 150.
- copy_all_inputs (bool): If specified, all input parameters will be deep copied before the method is run. This is useful for debugging problems where the input parameters are being modified by the algorithm, but can slow down the code.
- noise_std_dev (float): Standard deviation of Gaussian noise. Default value 0.175.
- objective (bool): If set, an estimate of the final objective function is printed.
- replicates (int): Number of Gaussian-perturbed replicates to use (per point) in Radical2D. Default value 30.
- seed (int): Random seed. If 0, 'std::time(NULL)' is used. Default value 0.
- sweeps (int): Number of sweeps; each sweep calls Radical2D once for each pair of dimensions. Default value 0.
- verbose (bool): Display informational messages and the full list of parameters and timers at the end of execution.
The return value from the binding is a dict containing the following elements:
- output_ic (numpy matrix, float dtype): Matrix to save independent components to.
- output_unmixing (numpy matrix, float dtype): Matrix to save unmixing matrix to.