Ignore:
Timestamp:
Dec 26, 2006, 7:21:36 PM (15 years ago)
Author:
Jari Häkkinen
Message:

Fixes #170. Almost all inlines removed, some classes have no cc file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/classifier/SVM.cc

    r706 r720  
    7878  }
    7979
     80  const utility::vector& SVM::alpha(void) const
     81  {
     82    return alpha_;
     83  }
     84
     85  double SVM::C(void) const
     86  {
     87    return 1.0/C_inverse_;
     88  }
    8089
    8190  void SVM::calculate_margin(void)
     
    8998  }
    9099
     100  double SVM::kernel_mod(const size_t i, const size_t j) const
     101  {
     102    return i!=j ? (*kernel_)(i,j) : (*kernel_)(i,j) + C_inverse_;
     103  }
    91104
    92105  SupervisedClassifier* SVM::make_classifier(const DataLookup2D& data,
     
    110123  }
    111124
     125  long int SVM::max_epochs(void) const
     126  {
     127    return max_epochs_;
     128  }
     129
     130  const theplu::yat::utility::vector& SVM::output(void) const
     131  {
     132    return output_;
     133  }
     134
    112135  void SVM::predict(const DataLookup2D& input, utility::matrix& prediction) const
    113136  {
     
    153176    trained_=false;
    154177    alpha_=utility::vector(target_.size(), 0);
     178  }
     179
     180  int SVM::target(size_t i) const
     181  {
     182    return target_.binary(i) ? 1 : -1;
    155183  }
    156184
Note: See TracChangeset for help on using the changeset viewer.