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/DiagnosticCurves>
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 
274  double CostCrossEntropy(const Pds::Vector &W,const Pds::Matrix &X,const Pds::Vector &Y);
275 
311  double CostMeanSquare(const Pds::Vector &W,const Pds::Matrix &X,const Pds::Vector &Y);
312 
313 
334  Pds::Vector GetW0MeanMethod(const Pds::Matrix &X);
335 
345  Pds::Vector GetW0CornerMeanMethod(const Pds::Matrix &X);
346 
358  Pds::Vector GetW0MeanSquareMethod(const Pds::Matrix &X);
359 
419  const Pds::Matrix &X,
420  const Pds::Vector &Y,
421  double Delta=0.0001);
422 
467  Pds::Vector FittingLogitMeanSquare( const Pds::Matrix &X,
468  const Pds::Vector &Y,
469  double Delta=0.0001);
470 
471 
521  const Pds::Matrix &X,
522  const Pds::Vector &Y,
523  const Pds::Vector &D,
524  double Delta=0.0001);
572  Pds::Vector FittingLogitWeightedMeanSquare( const Pds::Matrix &X,
573  const Pds::Vector &Y,
574  const Pds::Vector &D,
575  double Delta=0.0001);
576 
577 
578 
648  const Pds::Matrix &X,
649  const Pds::Vector &Y,
650  const Pds::Vector &W0);
651 
734  const Pds::Matrix &X,
735  const Pds::Vector &Y,
736  const Pds::Vector &W0);
737 
806  Pds::Vector FittingOrtogonalIG( const Pds::Matrix &X,
807  const Pds::Vector &Y,
808  unsigned int MinID);
809 
856  const Pds::Matrix &X,
857  const Pds::Vector &Y,
858  const Pds::Vector &W0);
859 
891  const Pds::Matrix &Xtr,
892  const Pds::Vector &Ytr,
893  const Pds::Matrix &Xcv,
894  const Pds::Vector &Ycv,
895  double percent);
896 
897 
898 
904 } // namespace Ml
905 
906 } // namespace Pds
907 
908 
913 #endif /* __PDS_FUNCLOGISTICMODEL_HPP__ */
La clase tipo Pds::DiagnosticCurves . Esta clase genera un bloque de datos para analizar curvas de ap...
La clase tipo Pds::IterationConf . Esta clase genera una matriz de Nlin lineas y 1 columna....
Pds::DiagnosticCurves 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.
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.
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.
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 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 GetW0CornerMeanMethod(const Pds::Matrix &X)
Obtiene de forma rapida un vector inicial para usar en regresion logistica.
Nombre de espacio para Pds (Procesamiento Digital de Senales)

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed