Ignore:
Timestamp:
Feb 26, 2008, 9:46:49 AM (14 years ago)
Author:
Markus Ringnér
Message:

Refs. #335, fixed for KNN

File:
1 edited

Legend:

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

    r1142 r1156  
    77#include "yat/utility/VectorMutable.h"
    88
     9#include <cmath>
    910#include <vector>
    1011
     
    1920  {           
    2021    for(size_t j=0;j<k_sorted.size();j++)
    21       prediction(target(k_sorted[j]))+=1.0;           
     22      if(!std::isinf(distance(k_sorted[j])))
     23         prediction(target(k_sorted[j]))+=1.0;           
    2224  }
    2325
Note: See TracChangeset for help on using the changeset viewer.