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 
19 namespace mlpack {
20 namespace radical {
21 
43 class Radical
44 {
45  public:
59  Radical(const double noiseStdDev = 0.175,
60  const size_t replicates = 30,
61  const size_t angles = 150,
62  const size_t sweeps = 0,
63  const size_t m = 0);
64 
75  void DoRadical(const arma::mat& matX,
76  arma::mat& matY,
77  arma::mat& matW,
78  util::Timers& timers = IO::GetTimers());
79 
86  double Vasicek(arma::vec& x) const;
87 
93  void CopyAndPerturb(arma::mat& xNew, const arma::mat& x) const;
94 
96  double DoRadical2D(const arma::mat& matX,
97  util::Timers& timers = IO::GetTimers());
98 
100  double NoiseStdDev() const { return noiseStdDev; }
102  double& NoiseStdDev() { return noiseStdDev; }
103 
105  size_t Replicates() const { return replicates; }
107  size_t& Replicates() { return replicates; }
108 
110  size_t Angles() const { return angles; }
112  size_t& Angles() { return angles; }
113 
115  size_t Sweeps() const { return sweeps; }
117  size_t& Sweeps() { return sweeps; }
118 
119  private:
122  double noiseStdDev;
123 
125  size_t replicates;
126 
128  size_t angles;
129 
132  size_t sweeps;
133 
135  size_t m;
136 
138  arma::mat perturbed;
140  arma::mat candidate;
141 };
142 
143 void WhitenFeatureMajorMatrix(const arma::mat& matX,
144  arma::mat& matXWhitened,
145  arma::mat& matWhitening);
146 
147 } // namespace radical
148 } // namespace mlpack
149 
150 // Include implementation.
151 #include "radical_impl.hpp"
152 
153 #endif
size_t Angles() const
Get the number of angles considered during brute-force search.
Definition: radical.hpp:110
size_t & Angles()
Modify the number of angles considered during brute-force search.
Definition: radical.hpp:112
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes, Armadillo, cereal, and a few basic mlpa...
size_t Sweeps() const
Get the number of sweeps.
Definition: radical.hpp:115
size_t & Replicates()
Modify the number of Gaussian-perturbed replicates used per point.
Definition: radical.hpp:107
double & NoiseStdDev()
Modify the standard deviation of the additive Gaussian noise.
Definition: radical.hpp:102
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:100
size_t Replicates() const
Get the number of Gaussian-perturbed replicates used per point.
Definition: radical.hpp:105
static util::Timers & GetTimers()
Retrieve the global Timers object.
An implementation of RADICAL, an algorithm for independent component analysis (ICA).
Definition: radical.hpp:43
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:117