Home | Develop | Download | Contact
example_funcpwc_probability.cpp
1 
23 #include <iostream>
24 #include <Pds/Ra>
25 #include <Pds/Ml>
26 
27 int main(void)
28 {
29  Pds::Octave::XLabel="x1";
30  Pds::Octave::YLabel="x2";
31  Pds::Octave::DAspect=true;
32 
33  Pds::IterationConf Conf; Conf.Show=true; Conf.SetMinError(1.0e-6);
34  unsigned int L=1000;
35  Pds::Matrix X;
36  Pds::Vector Y;
37  Pds::Vector P;
38 
39  // Generating data X=[x1 x2]
41 
42  Pds::Octave::MarkerSize=4;
43  Pds::Octave::Plot::PointsX2D(X,"testando.m","example_funcpwc_probability_data.png");
44 
45  // Mu, Sigma estimation
46  Pds::Matrix Sinv=X.CovMatrix().Inv();
47 
48  // density function
49  P=Pds::Probability::PWCDensity(X,X,Sinv,0.1);
50 
51  Pds::Octave::MarkerSize=12;
52  Pds::Octave::Plot::ScatterX2DY(X,P,"testando.m","example_funcpwc_probability_prob.png");
53 
54  // density function
55  P=Pds::Probability::PWCDensity(X,X,Sinv,0.1,1.0/Sinv.Det());
56 
57  Pds::Octave::MarkerSize=12;
58  Pds::Octave::Plot::ScatterX2DY(X,P,"testando.m","example_funcpwc_probability_prob2.png");
59 
60  return 0;
61 }
La clase tipo Pds::IterationConf . Esta clase genera una matriz de Nlin lineas y 1 columna....
bool SetMinError(double MinError)
Coloca el valor MinError.
void LoadKGaussian(unsigned int L, unsigned int K, Pds::Matrix &X, Pds::Vector &Y, double factor=0.70711)
Clasificación múltiple de datos.
Pds::Vector PWCDensity(const Pds::Matrix &X, const Pds::Matrix &C, const Pds::Matrix &Sinv, double h=0.1)
Retorna un vector . Con este fin, evalua la "Parzen Window Classifier probability density function" .

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed