Ignore:
Timestamp:
Feb 18, 2008, 4:13:53 AM (14 years ago)
Author:
Jari Häkkinen
Message:

Fixes #299. Memory leak in matrix was found and removed.

File:
1 edited

Legend:

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

    r1050 r1098  
    251251    // for each test sample (column in distances) find the closest
    252252    // training samples
    253     prediction.clone(utility::matrix(target_.nof_classes(),test.columns(),0.0));
     253    prediction.resize(target_.nof_classes(),test.columns(),0.0);
    254254    for(size_t sample=0;sample<distances->columns();sample++) {
    255255      std::vector<size_t> k_index;
Note: See TracChangeset for help on using the changeset viewer.