1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- /**
- * @file VCLogisticRegression.h
- * @brief Simple Gaussian Classifier
- * @author Erik Rodner
- * @date 12/05/2007
- */
- #ifndef VCLogisticRegressionINCLUDE
- #define VCLogisticRegressionINCLUDE
- #include "core/vector/VectorT.h"
- #include "core/vector/MatrixT.h"
-
- #include "vislearning/classifier/classifierbase/VecClassifier.h"
- namespace OBJREC {
- /** Simple Gaussian Classifier */
- class VCLogisticRegression : public VecClassifier
- {
- protected:
- /** setting, whether to use ML-estimation
- or MAP-estimation */
- bool mlestimation;
- /** parameters of the sigmoid function
- 1.0 / (1.0 + exp(A*x + B) ) */
- double sigmoidA;
- double sigmoidB;
- public:
-
- /** simple constructor using config values */
- VCLogisticRegression( const NICE::Config *conf);
-
- /** simple constructor */
- VCLogisticRegression();
-
- /** simple destructor */
- virtual ~VCLogisticRegression();
-
- /** classify using simple vector */
- ClassificationResult classify ( const NICE::Vector & x ) const;
- /** classify using a simple vector */
- void teach ( const LabeledSetVector & teachSet );
- void finishTeaching() {};
-
- /** clone this object */
- virtual VCLogisticRegression *clone(void) const;
- void clear ();
- void store ( std::ostream & os, int format = 0 ) const;
- void restore ( std::istream & is, int format = 0 );
-
- };
- } // namespace
- #endif
|