Programa para el testeo de las funciones.Para compilar o código example_funcpwc_probability.cpp:
g++ -static -o example_funcpwc_probability example_funcpwc_probability.cpp -lpdsmlmm -lpdsramm -lpdsspmm
Para executar o programa:
./example_funcpwc_probability
Retornando por consola:
Anomaly detection - data
Anomaly detection - probability
Código example_funcpwc_probability.cpp:
#include <iostream>
#include <Pds/Ra>
#include <Pds/Ml>
int main(void)
{
Pds::Octave::XLabel="x1";
Pds::Octave::YLabel="x2";
Pds::Octave::DAspect=true;
unsigned int L=1000;
Pds::Matrix X;
Pds::Vector Y;
Pds::Vector P;
Pds::Octave::MarkerSize=4;
Pds::Octave::Plot::PointsX2D(X,"testando.m","example_funcpwc_probability_data.png");
Pds::Matrix Sinv=X.CovMatrix().Inv();
Pds::Octave::MarkerSize=12;
Pds::Octave::Plot::ScatterX2DY(X,P,"testando.m","example_funcpwc_probability_prob.png");
Pds::Octave::MarkerSize=12;
Pds::Octave::Plot::ScatterX2DY(X,P,"testando.m","example_funcpwc_probability_prob2.png");
return 0;
}
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" .