Home | Develop | Download | Contact
FuncLogisticModel.hpp
1 /*
2  * FuncLogisticModel.hpp
3  *
4  * Copyright 2018 Fernando Pujaico Rivera <fernando.pujaico.rivera@gmail.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19  * MA 02110-1301, USA.
20  *
21  */
22 
30 #ifndef __PDS_FUNCLOGISTICMODEL_HPP__
31 #define __PDS_FUNCLOGISTICMODEL_HPP__
32 
33 #include <string>
34 #include <list>
35 #include <Pds/Ra>
36 #include <Pds/IterationConf>
37 #include <Pds/DataErrorCurve>
38 
48 namespace Pds{
49 
54 namespace LogisticModel{
55 
56 
83 Pds::Vector Classify(const Pds::Vector &W,const Pds::Matrix &X);
84 
85 
172  double CostInformationGain(const Pds::Vector &W,const Pds::Matrix &X,const Pds::Vector &Y);
173 
232  Pds::Vector GradientCostInformationGain( const Pds::Vector &W,
233  const Pds::Matrix &X,
234  const Pds::Vector &Y,
235  double h);
236 
237 
238 
239 
277  double CostCrossEntropy(const Pds::Vector &W,const Pds::Matrix &X,const Pds::Vector &Y);
278 
314  double CostMeanSquare(const Pds::Vector &W,const Pds::Matrix &X,const Pds::Vector &Y);
315 
316 
344  Pds::Vector GetW0MeanMethod(const Pds::Matrix &X);
345 
360  Pds::Vector GetW0CornerMeanMethod(const Pds::Matrix &X, double Delta=0.001);
361 
378  Pds::Vector GetW0MeanSquareMethod(const Pds::Matrix &X);
379 
439  const Pds::Matrix &X,
440  const Pds::Vector &Y,
441  double Delta=0.0001);
442 
487  Pds::Vector FittingLogitMeanSquare( const Pds::Matrix &X,
488  const Pds::Vector &Y,
489  double Delta=0.0001);
490 
491 
544  const Pds::Matrix &X,
545  const Pds::Vector &Y,
546  const Pds::Vector &D,
547  double Delta=0.0001);
598  Pds::Vector FittingLogitWeightedMeanSquare( const Pds::Matrix &X,
599  const Pds::Vector &Y,
600  const Pds::Vector &D,
601  double Delta=0.0001);
602 
603 
637  Pds::Vector FittingRobustLogitMeanSquare( const Pds::Matrix &X,
638  const Pds::Vector &Y,
639  double Delta=0.0001,
640  unsigned int N=2,
641  double Offset=0.1);
642 
668  const Pds::Matrix &X,
669  const Pds::Vector &Y,
670  double Delta=0.0001,
671  unsigned int N=2,
672  double Offset=0.1);
673 
684  const Pds::Matrix &X,
685  const Pds::Vector &Y,
686  double Delta);
687 
757  const Pds::Matrix &X,
758  const Pds::Vector &Y,
759  const Pds::Vector &W0);
760 
843  const Pds::Matrix &X,
844  const Pds::Vector &Y,
845  const Pds::Vector &W0);
846 
915  Pds::Vector FittingOrtogonalIG( const Pds::Matrix &X,
916  const Pds::Vector &Y,
917  unsigned int MinID);
918 
970  const Pds::Matrix &X,
971  const Pds::Vector &Y,
972  const Pds::Vector &W0);
973 
988  Pds::Vector FittingParrallelPlaneIS(const Pds::Matrix &X,
989  const Pds::Vector &Y,
990  const Pds::Vector &W0,
991  double *ISmin=NULL,
992  double Delta=0.001);
993 
1014  Pds::Vector FittingByFactor(const Pds::Matrix &X,
1015  const Pds::Vector &Y,
1016  const Pds::Vector &W0,
1017  double Delta=0.001);
1049  const Pds::Matrix &Xtr,
1050  const Pds::Vector &Ytr,
1051  const Pds::Matrix &Xcv,
1052  const Pds::Vector &Ycv,
1053  double percent);
1054 
1055 
1056 
1062 } // namespace Ml
1063 
1064 } // namespace Pds
1065 
1066 
1071 #endif /* __PDS_FUNCLOGISTICMODEL_HPP__ */
La clase tipo Pds::DataErrorCurve . Esta clase genera un bloque de datos para analizar curvas de apre...
La clase tipo Pds::IterationConf . Esta clase genera una matriz de Nlin lineas y 1 columna....
Pds::Vector GradientCostInformationGain(const Pds::Vector &W, const Pds::Matrix &X, const Pds::Vector &Y, double h)
Calculo de costo.
Pds::Vector FittingLogitMeanSquare(Pds::IterationConf &Conf, const Pds::Matrix &X, const Pds::Vector &Y, double Delta=0.0001)
Calculo de pesos.
Pds::Vector GetW0CornerMeanMethod(const Pds::Matrix &X, double Delta=0.001)
Obtiene de forma rapida un vector inicial para usar en regresion logistica.
Pds::DataErrorCurve LearningCurves(Pds::IterationConf &Conf, const Pds::Matrix &Xtr, const Pds::Vector &Ytr, const Pds::Matrix &Xcv, const Pds::Vector &Ycv, double percent)
Retorna learning curve.
double CostCrossEntropy(const Pds::Vector &W, const Pds::Matrix &X, const Pds::Vector &Y)
Calculo de pesos.
Pds::Vector FittingLogitWeightedMeanSquare(Pds::IterationConf &Conf, const Pds::Matrix &X, const Pds::Vector &Y, const Pds::Vector &D, double Delta=0.0001)
Calculo de pesos.
Pds::Vector FittingGradientIG(Pds::IterationConf &Conf, const Pds::Matrix &X, const Pds::Vector &Y, const Pds::Vector &W0)
Calculo de pesos.
double CostMeanSquare(const Pds::Vector &W, const Pds::Matrix &X, const Pds::Vector &Y)
Calculo de pesos.
Pds::Vector FittingGradientCrossEntropy(Pds::IterationConf &Conf, const Pds::Matrix &X, const Pds::Vector &Y, const Pds::Vector &W0)
Gradiente descendente para sigmoide.
Pds::Vector FittingGradientSVM(Pds::IterationConf &Conf, const Pds::Matrix &X, const Pds::Vector &Y, const Pds::Vector &W0)
Gradiente descendente para sigmoide.
Pds::Vector FittingByFactor(const Pds::Matrix &X, const Pds::Vector &Y, const Pds::Vector &W0, double Delta=0.001)
Aplica la teoria de Logit MeanSquare para ajustar W0 por um factor real adecuado.
double CostInformationGain(const Pds::Vector &W, const Pds::Matrix &X, const Pds::Vector &Y)
Calculo de costo.
Pds::Vector Classify(const Pds::Vector &W, const Pds::Matrix &X)
Calculo del resultado del clasificador.
Pds::Vector FittingRobustLogitMeanSquare(const Pds::Matrix &X, const Pds::Vector &Y, double Delta=0.0001, unsigned int N=2, double Offset=0.1)
Calculo de pesos.
Pds::Vector GetW0MeanMethod(const Pds::Matrix &X)
Obtiene de forma rapida un vector inicial para usar en regresion logistica.
Pds::Vector FittingOrtogonalIG(const Pds::Matrix &X, const Pds::Vector &Y, unsigned int MinID)
Calculo de pesos.
Pds::Vector GetW0MeanSquareMethod(const Pds::Matrix &X)
Obtiene de forma rapida un vector inicial para usar en regresion logistica.
Pds::Vector FittingParrallelPlaneIS(const Pds::Matrix &X, const Pds::Vector &Y, const Pds::Vector &W0, double *ISmin=NULL, double Delta=0.001)
Calculo de pesos buscando el plano paralelo a W0 que genere la menor suma de informaciones en la part...
Pds::Vector FittingKmeansLogitMeanSquare(Pds::IterationConf &Conf, const Pds::Matrix &X, const Pds::Vector &Y, double Delta)
Nombre de espacio para Pds (Procesamiento Digital de Senales)

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed