Changeset 9021:404149bc3994 in orange


Ignore:
Timestamp:
09/26/11 14:36:30 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
25b480ca2f85d10d671de0fc61bc3f03a3cb5451
Message:

Added svm_type and svm_kernel attributes to SVMClassifier class.

Location:
source/orange
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • source/orange/libsvm_interface.cpp

    r8978 r9021  
    705705    this->examples = examples; 
    706706    domain = examples->domain; 
    707 //  model->param.classifier=this; 
     707    svm_type = svm_get_svm_type(model); 
     708    kernel_type = model->param.kernel_type; 
    708709    this->kernelFunc = kernelFunc; 
    709 //    if (model->param.learner) // if the model not constructed at unpickling 
    710 //      kernelFunc=model->param.learner->kernelFunc; 
    711 //    model->param.learner=NULL; 
    712 //  currentExample=NULL; 
    713     int svm_type = svm_get_svm_type(model); 
     710 
    714711    computesProbabilities = model && svm_check_probability_model(model) && \ 
    715712            (svm_type != NU_SVR && svm_type != EPSILON_SVR); // Disable prob. estimation for regression 
    716 //  if(!classVar && model->param.svm_type==ONE_CLASS) 
    717 //      classVar=mlnew TFloatVariable(); 
     713 
    718714    int nr_class = svm_get_nr_class(model); 
    719715    int i = 0; 
  • source/orange/libsvm_interface.hpp

    r8978 r9021  
    148148    PKernelFunc kernelFunc; //P custom kernel function 
    149149 
    150 //  const TExample *currentExample; 
     150    int svm_type; //P(&SVMLearner_SVMType)  SVM type (C_SVC=0, NU_SVC, ONE_CLASS, EPSILON_SVR=3, NU_SVR=4) 
     151    int kernel_type; //P(&SVMLearner_Kernel)  kernel type (LINEAR=0, POLY, RBF, SIGMOID, CUSTOM=4) 
    151152 
    152153    svm_model* getModel() {return model;} 
Note: See TracChangeset for help on using the changeset viewer.