123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- #ifndef SLRDEF
- #define SLRDEF
- #include "core/vector/VectorT.h"
- #include "core/vector/MatrixT.h"
- #include "vislearning/classifier/classifierbase/FeaturePoolClassifier.h"
- #include "vislearning/cbaselib/FeaturePool.h"
- #include "core/algebra/GMSparseVectorMatrix.h"
- namespace OBJREC {
- class SLR : public NICE::Persistent
- {
-
- public:
-
- const NICE::Config *conf;
-
- std::string confsection;
-
- NICE::SparseVector weight;
-
- FeaturePool fp;
-
- int maxiter;
-
- double resamp_decay;
-
- double convergence_tol;
-
- double min_resamp;
-
- int fdim;
-
- double lambda;
-
- double samplesperclass;
-
- std::vector<double> minval, maxval;
- public:
-
- SLR ( const NICE::Config *conf, std::string section = "SMLR" );
-
- SLR ();
-
- ~SLR();
-
- double classify ( Example & pce );
-
- void train ( FeaturePool & _fp, Examples & examples, int classno = 1 );
-
- FeaturePoolClassifier *clone () const;
-
- int stepwise_regression ( Examples &x, int classno = 1 );
-
- void restore ( std::istream & is, int format = 0 );
- void store ( std::ostream & os, int format = 0 ) const;
- void clear ();
- };
- }
- #endif
|