#include <bias_config.h>
#include <MathAlgo/LDA.hh>
#include <Base/Math/Random.hh>
using namespace BIAS;
using namespace std;
int main(int args, char **arg)
{
std::vector<std::vector<BIAS::Vector<LDAType> > > vec;
int reductionSize = 2;
std::vector<BIAS::Matrix<LDAType> > *covs = NULL;
unsigned int classes = 3;
unsigned int numsamples = 1000;
unsigned int dim = 2;
sigma[0] = 1.1;
sigma[1] = 0.01;
for (unsigned int i=2; i<dim; i++) sigma[i] = 0.1;
vector<Vector<LDAType> > means;
for (unsigned int c=0; c<classes; c++){
means.push_back(curMean);
switch (c) {
case 0: curMean[0] = -1;curMean[1] = 0;break;
case 1: curMean[0] = 1;curMean[1] = 0;break;
case 2: curMean[0] = 0.1f;curMean[1] = -0.1f;break;
default: {
for (unsigned int d=0; d<dim; d++) {
double(d));
estMean[d] = 0;
}
}
}
cout<<"mean "<<c<<" is "<<curMean<<endl;
std::vector<BIAS::Vector<LDAType> > curvec;
for (unsigned int i=0; i<numsamples; i++) {
for (unsigned int d=0; d<dim; d++) {
estMean[d] += sample[d];
}
curvec.push_back(sample);
}
for (unsigned int d=0; d<dim; d++) {
estMean[d] /= float(numsamples);
}
cout<<"estimated mean is "<<estMean<<endl;
vec.push_back(curvec);
}
cout<<"Reduction matrix is "<<matrix<<endl;
return 0;
}