Ignore:
Timestamp:
Feb 1, 2008, 5:15:44 AM (14 years ago)
Author:
Peter
Message:

merging branch peter-dev into trunk delta 1008:994

File:
1 edited

Legend:

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

    r1000 r1009  
    205205
    206206    // normalize each row (label) to sum up to unity (probability)
    207     for (size_t i=0; i<prediction.rows(); ++i)
    208       utility::vector(prediction,i) *=
    209         1.0/utility::sum(utility::vector(prediction,i));
    210 
     207    for (size_t i=0; i<prediction.rows(); ++i){
     208      prediction.row_vec(i) *=
     209        1.0/sum(
     210                prediction.row_vec(i)
     211                );
     212    }
    211213  }
    212214
Note: See TracChangeset for help on using the changeset viewer.