radical.hpp
Go to the documentation of this file.
1 
14 #ifndef MLPACK_METHODS_RADICAL_RADICAL_HPP
15 #define MLPACK_METHODS_RADICAL_RADICAL_HPP
16 
17 #include <mlpack/prereqs.hpp>
18 #include <mlpack/core/util/io.hpp>
19 
20 namespace mlpack {
21 namespace radical {
22 
44 class Radical
45 {
46  public:
60  Radical(const double noiseStdDev = 0.175,
61  const size_t replicates = 30,
62  const size_t angles = 150,
63  const size_t sweeps = 0,
64  const size_t m = 0);
65 
76  void DoRadical(const arma::mat& matX,
77  arma::mat& matY,
78  arma::mat& matW,
79  util::Timers& timers = IO::GetTimers());
80 
87  double Vasicek(arma::vec& x) const;
88 
94  void CopyAndPerturb(arma::mat& xNew, const arma::mat& x) const;
95 
97  double DoRadical2D(const arma::mat& matX,
98  util::Timers& timers = IO::GetTimers());
99 
101  double NoiseStdDev() const { return noiseStdDev; }
103  double& NoiseStdDev() { return noiseStdDev; }
104 
106  size_t Replicates() const { return replicates; }
108  size_t& Replicates() { return replicates; }
109 
111  size_t Angles() const { return angles; }
113  size_t& Angles() { return angles; }
114 
116  size_t Sweeps() const { return sweeps; }
118  size_t& Sweeps() { return sweeps; }
119 
120  private:
123  double noiseStdDev;
124 
126  size_t replicates;
127 
129  size_t angles;
130 
133  size_t sweeps;
134 
136  size_t m;
137 
139  arma::mat perturbed;
141  arma::mat candidate;
142 };
143 
144 void WhitenFeatureMajorMatrix(const arma::mat& matX,
145  arma::mat& matXWhitened,
146  arma::mat& matWhitening);
147 
148 } // namespace radical
149 } // namespace mlpack
150 
151 #endif
size_t Angles() const
Get the number of angles considered during brute-force search.
Definition: radical.hpp:111
size_t & Angles()
Modify the number of angles considered during brute-force search.
Definition: radical.hpp:113
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
size_t Sweeps() const
Get the number of sweeps.
Definition: radical.hpp:116
size_t & Replicates()
Modify the number of Gaussian-perturbed replicates used per point.
Definition: radical.hpp:108
double & NoiseStdDev()
Modify the standard deviation of the additive Gaussian noise.
Definition: radical.hpp:103
void DoRadical(const arma::mat &matX, arma::mat &matY, arma::mat &matW, util::Timers &timers=IO::GetTimers())
Run RADICAL.
double DoRadical2D(const arma::mat &matX, util::Timers &timers=IO::GetTimers())
Two-dimensional version of RADICAL.
double NoiseStdDev() const
Get the standard deviation of the additive Gaussian noise.
Definition: radical.hpp:101
size_t Replicates() const
Get the number of Gaussian-perturbed replicates used per point.
Definition: radical.hpp:106
static util::Timers & GetTimers()
Retrieve the global Timers object.
An implementation of RADICAL, an algorithm for independent component analysis (ICA).
Definition: radical.hpp:44
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.
void WhitenFeatureMajorMatrix(const arma::mat &matX, arma::mat &matXWhitened, arma::mat &matWhitening)
double Vasicek(arma::vec &x) const
Vasicek&#39;s m-spacing estimator of entropy, with overlap modification from (Learned-Miller and Fisher...
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...
size_t & Sweeps()
Modify the number of sweeps.
Definition: radical.hpp:118