Ignore:
Timestamp:
07/01/13 16:27:24 (10 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Cleanup of TLinearLearner/Classifier.

The training examples are sorted before training so the labels in
LIBLINEAR model match the order of class_var.values.

TLinearClassifier no longer has the 'examples' member, has a changed
constructor and (un)pickle signature.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/orange/liblinear_interface.hpp

    r10948 r11610  
    5151    int solver_type;    //P(&LinearLearner_Lossfunction1) Solver type (loss function1) 
    5252    float eps;          //P Stopping criteria 
    53     float C;            //P Regularization parameter 
     53    float C;            //P Regularization parameter C 
    5454    float bias;         //P bias parameter (default -1.0 - no bias) 
    5555 
     
    5858}; 
    5959 
    60 class ORANGE_API TLinearClassifier : public TClassifierFD{ 
     60class ORANGE_API TLinearClassifier : public TClassifierFD { 
    6161public: 
    6262    __REGISTER_CLASS 
     63 
    6364    TLinearClassifier() {}; 
    64     TLinearClassifier(const PVariable &var, PExampleTable examples, model *_model); 
     65 
     66    TLinearClassifier(PDomain domain, struct model * model); 
     67 
    6568    ~TLinearClassifier(); 
    6669 
     
    6972 
    7073    PFloatListList weights; //P Computed feature weights 
    71     PExampleTable examples; //P Examples used to train the classifier 
    7274    float bias; //PR bias 
     75 
    7376    model *getModel(){ return linmodel; } 
     77 
    7478private: 
    7579    model *linmodel; 
     80    // bias in double precision. 
    7681    double dbias; 
    7782    int get_nr_values(); 
Note: See TracChangeset for help on using the changeset viewer.