CSIM: linear_classification.h Source File

linear_classification.h

Go to the documentation of this file.
00001 
00005 #ifndef _LINEAR_CLASSIFICATION_H_
00006 #define _LINEAR_CLASSIFICATION_H_
00007 
00008 #include "algorithm.h"
00009 
00010 using namespace std;
00011 
00013 class linear_classification : public Algorithm {
00014 
00015   DO_REGISTERING
00016 
00017  public:
00021   linear_classification(unsigned int in_rows = 1, unsigned int classes = 2);
00022   
00023   ~linear_classification(void);
00024 
00029   int apply(const double* S, double* X);
00030 
00032   void reset();
00033 
00038   int importRepresentation(const double* rep, int rep_length);
00039 
00044   double* exportRepresentation(int *rep_length);
00045 
00047   string getFormatDescription();
00048 
00050   int nClasses;
00051 
00053   bool addBias;
00054 
00055  private:
00056 
00058   double **regression_coefficients;
00059 
00061   double weighted_sum(const double* S, const double* w);
00062 };
00063 
00064 #endif

 
(C) 2003, Thomas Natschläger last modified 07/10/2006