00001
00035
00036
00037
00038 #ifndef _ArtificialDistributions_H_
00039 #define _ArtificialDistributions_H_
00040
00041
00042 #include <ReClaM/Dataset.h>
00043 #include <Array/Array2D.h>
00044
00045
00063 class Chessboard : public DataSource
00064 {
00065 public:
00067 Chessboard(int dim = 2, int size = 4);
00068
00070 ~Chessboard();
00071
00072
00075 bool GetData(Array<double>& data, Array<double>& target, int count);
00076
00077 protected:
00079 int size;
00080 };
00081
00082
00094 class NoisyChessboard : public Chessboard
00095 {
00096 public:
00098 NoisyChessboard(int dim = 2, int size = 4, double noiselevel = 0.4);
00099
00101 ~NoisyChessboard();
00102
00103
00106 bool GetData(Array<double>& data, Array<double>& target, int count);
00107
00108 protected:
00110 double noiselevel;
00111 };
00112
00113
00117 class NoisyInterval : public DataSource
00118 {
00119 public:
00121 NoisyInterval(double bayesRate, int dimensions = 1);
00122
00124 ~NoisyInterval();
00125
00126
00129 bool GetData(Array<double>& data, Array<double>& target, int count);
00130
00131 protected:
00132 double bayesRate;
00133 int dimensions;
00134 };
00135
00136
00147 class SphereDistribution1 : public DataSource
00148 {
00149 public:
00151 SphereDistribution1(int dim);
00152
00154 ~SphereDistribution1();
00155
00156
00159 bool GetData(Array<double>& data, Array<double>& target, int count);
00160
00161 protected:
00162 int dimension;
00163 };
00164
00165
00176 class SparseDistribution : public DataSource
00177 {
00178 public:
00180 SparseDistribution(int n, int m, int k);
00181
00183 ~SparseDistribution();
00184
00185
00188 bool GetData(Array<double>& data, Array<double>& target, int count);
00189
00190 protected:
00191 int dim1;
00192 int dim2;
00193 int num;
00194 };
00195
00196
00203 class TransformedProblem : public DataSource
00204 {
00205 public:
00207 TransformedProblem(DataSource& source, Array2D<double>& transformation);
00208
00210 ~TransformedProblem();
00211
00212
00215 bool GetData(Array<double>& data, Array<double>& target, int count);
00216
00217 protected:
00218 DataSource& base;
00219 Array2D<double> transformation;
00220 };
00221
00222
00223 class MultiClassTestProblem : public DataSource
00224 {
00225 public:
00226 MultiClassTestProblem(double epsilon = 0.5);
00227 ~MultiClassTestProblem();
00228
00229 bool GetData(Array<double>& data, Array<double>& target, int count);
00230
00231 protected:
00232 double m_epsilon;
00233 };
00234
00235
00236 #endif
00237