As far as I know, kNN groups by Eucledian distance. So, you need numerical data 
as input. You said your dataset has only “speeches” and “type of people”. Are 
these input? or one of them is input and the latter one is output? Type of 
people should be a factor variable (I guess). I don’t know how you represent 
“speech” in your dataset. As character or numerical representation of a 
feature? If you send a minimal example of the problem, we can help you. Please, 
read posting guide.

> On 7 May 2017, at 18:44, Elahe chalabi via R-help <r-help@r-project.org> 
> wrote:
> 
> Hi all,
> 
> Does anyone know what is the best way to visualize KNN(K nearest neighbor) 
> results for classification of texts in R? 
> 
> My data set has only speeches and the type of the people for them which is 
> control group or Alzheimer group, KNN classifies these two groups for me but 
> I don't know how to plot the results. Does anyone know any special package?
> 
> 
> Thanks for any help!
> Elahe
> 
> ______________________________________________
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to