[R] Reg : null values in kmeans

Jannis bt_jannis at yahoo.de
Wed Dec 15 14:20:11 CET 2010


I do not really understand your question. You can use use kmeans but 
without the observations that include the NA values (e.g. by deleting 
whole rows in your observation matrix). If you want to keep the 
information in the valid observations of those rows, I fear you need to 
look for a clustering algorithm that can handle missing values. I doubt 
that there is a kmeans version that can. Think about inserting means of 
all other observations into the gaps, though this introduces bias as well.


Jannis

Raji schrieb:
> Hi,
>
>   I am using k means algorithm for clustering.My data contains a few null/NA
> values.kmeans doesnt cluster with those values.Are there any option like
> na.omit which can avoid these null values and cluster the remaining values?
>
> Thanks,
> Raji
>



More information about the R-help mailing list