-4

I have Searched everywhere and i got one code which works for integer values but i want code with string value ie to calculate centroids using string values can anyone help me? Thanks in advance

1 Answers1

0

k-means only works on numerical values.

It's called "k-means" because it computes the mean. The mean makes only sense on continuous values. What would the mean of "apple" and "orange" be?!?

And how would you use it for intrusionndetection?

K-means is way too unreliable for intrusion detection, and you nedd something for data streams

Has QUIT--Anony-Mousse
  • 76,138
  • 12
  • 138
  • 194