Ignore:
Timestamp:
Jan 14, 2008, 11:17:38 PM (14 years ago)
Author:
Peter
Message:

fixing out of range problem in creation of CrossValidationSampler? when having a Target with empty classes

File:
1 edited

Legend:

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

    r1000 r1002  
    7070    for (size_t i=0; i<N; ) {
    7171      // shuffle indices within class each class
    72       for (size_t j=0; j<target.nof_classes(); j++)
     72      for (size_t j=0; j+1<my_begin.size(); ++j)
    7373        random_shuffle(v.begin()+my_begin[j],v.begin()+my_begin[j+1],rnd);
    7474     
Note: See TracChangeset for help on using the changeset viewer.