Changeset 1028 for trunk/yat/classifier


Ignore:
Timestamp:
Feb 3, 2008, 2:53:29 AM (13 years ago)
Author:
Peter
Message:

documentation for VectorConstView? and changing name of view functions in matrix

Location:
trunk/yat/classifier
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/classifier/KNN.h

    r1027 r1028  
    262262      std::vector<size_t> k_index;
    263263      utility::sort_smallest_index(k_index,k_,
    264                                    distances->column_const_vec(sample));
     264                                   distances->column_const_view(sample));
    265265      for(size_t j=0;j<k_index.size();j++) {
    266266        prediction(target_(k_index[j]),sample)++;
  • trunk/yat/classifier/NBC.cc

    r1027 r1028  
    206206    // normalize each row (label) to sum up to unity (probability)
    207207    for (size_t i=0; i<prediction.rows(); ++i){
    208       prediction.row_vec(i) *=
    209         1.0/sum(prediction.row_const_vec(i));
     208      prediction.row_view(i) *= 1.0/sum(prediction.row_const_view(i));
    210209    }
    211210  }
Note: See TracChangeset for help on using the changeset viewer.