---
name: "mlpack_radical_Radical"
section: "3"
platform: "linux"
package: "mlpack-doc"
version: "1.0.10-1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/mlpack_radical_Radical"
---

# mlpack\_radical\_Radical(3)

An implementation of RADICAL, an algorithm for independent component analysis (ICA).

## NAME

mlpack::radical::Radical -

An implementation of RADICAL, an algorithm for independent component analysis (ICA).

## SYNOPSIS

### Public Member Functions

**Radical** (const double **noiseStdDev**=0.175, const size\_t **replicates**=30, const size\_t **angles**=150, const size\_t **sweeps**=0, const size\_t **m**=0)\
 *Set the parameters to RADICAL.*  size\_t **Angles** () const \
 *Get the number of angles considered during brute-force search.*  size\_t & **Angles** ()\
 *Modify the number of angles considered during brute-force search.*  void **CopyAndPerturb** (arma::mat &xNew, const arma::mat &x) const \
 *Make replicates of each data point (the number of replicates is set in either the constructor or with* **Replicates()***) and perturb data with Gaussian noise with standard deviation noiseStdDev.*  void **DoRadical** (const arma::mat &matX, arma::mat &matY, arma::mat &matW)\
 *Run RADICAL.*  double **DoRadical2D** (const arma::mat &matX)\
 *Two-dimensional version of RADICAL.*  double **NoiseStdDev** () const \
 *Get the standard deviation of the additive Gaussian noise.*  double & **NoiseStdDev** ()\
 *Modify the standard deviation of the additive Gaussian noise.*  size\_t **Replicates** () const \
 *Get the number of Gaussian-perturbed replicates used per point.*  size\_t & **Replicates** ()\
 *Modify the number of Gaussian-perturbed replicates used per point.*  size\_t **Sweeps** () const \
 *Get the number of sweeps.*  size\_t & **Sweeps** ()\
 *Modify the number of sweeps.*  std::string **ToString** () const \
 double **Vasicek** (arma::vec &x) const \
 *Vasicek's m-spacing estimator of entropy, with overlap modification from (Learned-Miller and Fisher, 2003).*

### Private Attributes

size\_t **angles**\
 *Number of angles to consider in brute-force search during Radical2D.*  arma::mat **candidate**\
 *Internal matrix, held as member variable to prevent memory reallocations.*  size\_t **m**\
 *Value of m to use for Vasicek's m-spacing estimator of entropy.*  double **noiseStdDev**\
 *Standard deviation of the Gaussian noise added to the replicates of the data points during Radical2D.*  arma::mat **perturbed**\
 *Internal matrix, held as member variable to prevent memory reallocations.*  size\_t **replicates**\
 *Number of Gaussian-perturbed replicates to use (per point) in Radical2D.*  size\_t **sweeps**\
 *Number of sweeps; each sweep calls Radical2D once for each pair of dimensions.*

## Detailed Description

An implementation of RADICAL, an algorithm for independent component analysis (ICA).

Let X be a matrix where each column is a point and each row a dimension. The goal is to find a square unmixing matrix W such that Y = W X and the rows of Y are independent components.

For more details, see the following paper:

```
@article{learned2003ica,
  title = {ICA Using Spacings Estimates of Entropy},
  author = {Learned-Miller, E.G. and Fisher III, J.W.},
  journal = {Journal of Machine Learning Research},
  volume = {4},
  pages = {1271--1295},
  year = {2003}
}
```

Definition at line 53 of file radical.hpp.

## Constructor & Destructor Documentation

### mlpack::radical::Radical::Radical (const doublenoiseStdDev = `0.175`, const size\_treplicates = `30`, const size\_tangles = `150`, const size\_tsweeps = `0`, const size\_tm = `0`)

Set the parameters to RADICAL.

**Parameters:**

*noiseStdDev* Standard deviation of the Gaussian noise added to the replicates of the data points during Radical2D \
 *replicates* Number of Gaussian-perturbed replicates to use (per point) in Radical2D \
 *angles* Number of angles to consider in brute-force search during Radical2D \
 *sweeps* Number of sweeps. Each sweep calls Radical2D once for each pair of dimensions \
 *m* The variable m from Vasicek's m-spacing estimator of entropy.

## Member Function Documentation

### size\_t mlpack::radical::Radical::Angles () const` [inline]`

Get the number of angles considered during brute-force search.

Definition at line 115 of file radical.hpp.

References angles.

### size\_t& mlpack::radical::Radical::Angles ()` [inline]`

Modify the number of angles considered during brute-force search.

Definition at line 117 of file radical.hpp.

References angles.

### void mlpack::radical::Radical::CopyAndPerturb (arma::mat &xNew, const arma::mat &x) const

Make replicates of each data point (the number of replicates is set in either the constructor or with **Replicates()**) and perturb data with Gaussian noise with standard deviation noiseStdDev.

### void mlpack::radical::Radical::DoRadical (const arma::mat &matX, arma::mat &matY, arma::mat &matW)

Run RADICAL.

**Parameters:**

*matX* Input data into the algorithm - a matrix where each column is a point and each row is a dimension. \
 *matY* Estimated independent components - a matrix where each column is a point and each row is an estimated independent component. \
 *matW* Estimated unmixing matrix, where matY = matW \* matX.

### double mlpack::radical::Radical::DoRadical2D (const arma::mat &matX)

Two-dimensional version of RADICAL.

### double mlpack::radical::Radical::NoiseStdDev () const` [inline]`

Get the standard deviation of the additive Gaussian noise.

Definition at line 105 of file radical.hpp.

References noiseStdDev.

### double& mlpack::radical::Radical::NoiseStdDev ()` [inline]`

Modify the standard deviation of the additive Gaussian noise.

Definition at line 107 of file radical.hpp.

References noiseStdDev.

### size\_t mlpack::radical::Radical::Replicates () const` [inline]`

Get the number of Gaussian-perturbed replicates used per point.

Definition at line 110 of file radical.hpp.

References replicates.

### size\_t& mlpack::radical::Radical::Replicates ()` [inline]`

Modify the number of Gaussian-perturbed replicates used per point.

Definition at line 112 of file radical.hpp.

References replicates.

### size\_t mlpack::radical::Radical::Sweeps () const` [inline]`

Get the number of sweeps.

Definition at line 120 of file radical.hpp.

References sweeps.

### size\_t& mlpack::radical::Radical::Sweeps ()` [inline]`

Modify the number of sweeps.

Definition at line 122 of file radical.hpp.

References sweeps.

### std::string mlpack::radical::Radical::ToString () const

### double mlpack::radical::Radical::Vasicek (arma::vec &x) const

Vasicek's m-spacing estimator of entropy, with overlap modification from (Learned-Miller and Fisher, 2003).

**Parameters:**

*x* Empirical sample (one-dimensional) over which to estimate entropy.

## Member Data Documentation

### size\_t mlpack::radical::Radical::angles` [private]`

Number of angles to consider in brute-force search during Radical2D.

Definition at line 136 of file radical.hpp.

Referenced by Angles().

### arma::mat mlpack::radical::Radical::candidate` [private]`

Internal matrix, held as member variable to prevent memory reallocations.

Definition at line 148 of file radical.hpp.

### size\_t mlpack::radical::Radical::m` [private]`

Value of m to use for Vasicek's m-spacing estimator of entropy.

Definition at line 143 of file radical.hpp.

### double mlpack::radical::Radical::noiseStdDev` [private]`

Standard deviation of the Gaussian noise added to the replicates of the data points during Radical2D.

Definition at line 130 of file radical.hpp.

Referenced by NoiseStdDev().

### arma::mat mlpack::radical::Radical::perturbed` [private]`

Internal matrix, held as member variable to prevent memory reallocations.

Definition at line 146 of file radical.hpp.

### size\_t mlpack::radical::Radical::replicates` [private]`

Number of Gaussian-perturbed replicates to use (per point) in Radical2D.

Definition at line 133 of file radical.hpp.

Referenced by Replicates().

### size\_t mlpack::radical::Radical::sweeps` [private]`

Number of sweeps; each sweep calls Radical2D once for each pair of dimensions.

Definition at line 140 of file radical.hpp.

Referenced by Sweeps().

## Author

Generated automatically by Doxygen for MLPACK from the source code.
