[R] visualization of KNN results in text classification
Elahe chalabi
chalabi.elahe at yahoo.de
Fri May 12 14:30:27 CEST 2017
Thanks for your reply. What I exactly have is a data frame with rows containing words which have been used in each speech and columns containing frequency of these words, I have an extra row showing the type of the speech whether it was from a control group or Alzheimer group. Then I create a training and test set for KNN from this data frame and by KNN I classify the speeches which assigns every speech (actually text of the speech!) to the correct type of group, if it's from control group or Alzheimer group.
Now my question is how can I visualize my KNN classifier or its results? cause now I only have an accuracy matrix from KNN!
Thanks for any help!
Elahe
On Monday, May 8, 2017 3:55 PM, Ismail SEZEN <sezenismail at gmail.com> wrote:
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.
> ______________________________________________
> R-help at 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.
More information about the R-help
mailing list