Changeset 182


Ignore:
Timestamp:
Oct 4, 2004, 6:45:52 PM (18 years ago)
Author:
Peter
Message:

.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SVM.cc

    r167 r182  
    102102  {
    103103    using namespace std;
    104 
    105104    // initializing variables for optimization
    106105    gslapi::matrix kernel_train(train_set_.size(),train_set_.size());
    107106    gslapi::vector alpha_train(train_set_.size());
    108107    gslapi::vector target_train(train_set_.size());
     108       
    109109    for (unsigned int i=0; i<train_set_.size(); i++) {
    110       alpha_train(i) = alpha_(train_set_[i]);
    111110      target_train(i) = target_(train_set_[i]);
    112111      for (unsigned int j=0; j<train_set_.size(); j++)
    113112        kernel_train(i,j) = kernel_.get()(train_set_[i],train_set_[j]);
    114113    }
    115 
    116114    // Modify the diagonal of the kernel matrix (soft margin)
    117115    if (c_>0){
     
    131129    double v;
    132130    bool stop_condition = false;
    133     std::cout << "target:\n" << target_train << "\n";
    134     std::cout << "kernel:\n" << kernel_train << "\n";
    135131    // Training loop
    136132    while(!stop_condition) {
Note: See TracChangeset for help on using the changeset viewer.