Documentation of 'smile.imputation.KNNImputation' Java class
KNNImputation
smile.imputation

Class KNNImputation

  • All Implemented Interfaces:
    MissingValueImputation


    public class KNNImputation
    extends java.lang.Object
    implements MissingValueImputation
    Missing value imputation by k-nearest neighbors. The KNN-based method selects instances similar to the instance of interest to impute missing values. If we consider instance A that has one missing value on attribute i, this method would find K other instances, which have a value present on attribute 1, with values most similar (in term of some distance, e.g. Euclidean distance) to A on other attributes without missing values. The average of values on attribute i from the K nearest neighbors is then used as an estimate for the missing value in instance A. In the weighted average, the contribution of each instance is weighted by similarity between it and instance A.
    • Constructor Summary

      Constructors 
      Constructor and Description
      KNNImputation(int k)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void impute(double[][] data)
      Impute missing values in the dataset.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.