KNN handle missing values

View: New views
2 Messages — Rating Filter:   Alert me  

KNN handle missing values

by Jonathan Andrade Silva :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I would like to know how the classifier KNN deal missing values?

Thanks in advanced,
--
----------------------------------------
Jonathan de Andrade Silva
----------------------------------------

_______________________________________________
Wekalist mailing list
Wekalist@...
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist

Re: KNN handle missing values

by Peter Reutemann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I would like to know how the classifier KNN deal missing values?

The following applies to the developer version of Weka...

KNN itself doesn't deal with missing values, it's the distance
function. E.g., in case of euclidean distance, the following applies
to missing values while computing the distance of the same attribute
between two weka.core.Instance objects:
- attributes in both Instance objects have missing value
  => 0
- only one value is missing
  ~ nominal attribute
    => 1
  ~ numeric attribute
    => 1 in case of normalization, maxRange-minRange for that
attribute otherwise

See method "difference" in the weka.core.NormalizableDistance class
(weka.core.EuclideanDistance is derived from this class).

Cheers, Peter
--
Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ
http://www.cs.waikato.ac.nz/~fracpete/           Ph. +64 (7) 858-5174

_______________________________________________
Wekalist mailing list
Wekalist@...
https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
LightInTheBox - Buy quality products at wholesale price!