Changeset 176


Ignore:
Timestamp:
Sep 30, 2004, 3:15:28 PM (18 years ago)
Author:
Jari Häkkinen
Message:

Corrected modification calculation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/WeNNI.cc

    r174 r176  
    4040          // Avoid division with zero (perfect match vectors)
    4141          double d=(distance[*k].second ? distance[*k].second : 1e-10);
    42           new_value+=1.0*data_(distance[*k].first,j)/d;
    43           norm+=1.0/d;
     42          new_value+=(weight_(distance[*k].first,j) *
     43                      data_(distance[*k].first,j)/d);
     44          norm+=weight_(distance[*k].first,j)/d;
    4445        }
    4546        // No impute if no contributions from neighbours.
Note: See TracChangeset for help on using the changeset viewer.