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 
74  void DoRadical(const arma::mat& matX, arma::mat& matY, arma::mat& matW);
75 
82  double Vasicek(arma::vec& x) const;
83 
89  void CopyAndPerturb(arma::mat& xNew, const arma::mat& x) const;
90 
92  double DoRadical2D(const arma::mat& matX);
93 
95  double NoiseStdDev() const { return noiseStdDev; }
97  double& NoiseStdDev() { return noiseStdDev; }
98 
100  size_t Replicates() const { return replicates; }
102  size_t& Replicates() { return replicates; }
103 
105  size_t Angles() const { return angles; }
107  size_t& Angles() { return angles; }
108 
110  size_t Sweeps() const { return sweeps; }
112  size_t& Sweeps() { return sweeps; }
113 
114  private:
117  double noiseStdDev;
118 
120  size_t replicates;
121 
123  size_t angles;
124 
127  size_t sweeps;
128 
130  size_t m;
131 
133  arma::mat perturbed;
135  arma::mat candidate;
136 };
137 
138 void WhitenFeatureMajorMatrix(const arma::mat& matX,
139  arma::mat& matXWhitened,
140  arma::mat& matWhitening);
141 
142 } // namespace radical
143 } // namespace mlpack
144 
145 #endif
double DoRadical2D(const arma::mat &matX)
Two-dimensional version of RADICAL.
size_t Angles() const
Get the number of angles considered during brute-force search.
Definition: radical.hpp:105
size_t & Angles()
Modify the number of angles considered during brute-force search.
Definition: radical.hpp:107
.hpp
Definition: add_to_po.hpp:21
The core includes that mlpack expects; standard C++ includes and Armadillo.
size_t Sweeps() const
Get the number of sweeps.
Definition: radical.hpp:110
size_t & Replicates()
Modify the number of Gaussian-perturbed replicates used per point.
Definition: radical.hpp:102
double & NoiseStdDev()
Modify the standard deviation of the additive Gaussian noise.
Definition: radical.hpp:97
double NoiseStdDev() const
Get the standard deviation of the additive Gaussian noise.
Definition: radical.hpp:95
size_t Replicates() const
Get the number of Gaussian-perturbed replicates used per point.
Definition: radical.hpp:100
An implementation of RADICAL, an algorithm for independent component analysis (ICA).
Definition: radical.hpp:43
void DoRadical(const arma::mat &matX, arma::mat &matY, arma::mat &matW)
Run RADICAL.
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:112