Elahe chalabi
2017-May-07 15:44 UTC
[R] visualization of KNN results in text classification
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
Elahe chalabi
2017-May-08 11:59 UTC
[R] visualization of KNN results in text classification
Any idea?! On Sunday, May 7, 2017 5:56 PM, Elahe chalabi via R-help <r-help at 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 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. [[alternative HTML version deleted]]
Sarah Goslee
2017-May-08 13:29 UTC
[R] visualization of KNN results in text classification
Well, probably you need to first tell us why none of the suggestions that come up when you google "plot KNN results in R" work for you, and what other kind of plot you are trying to produce, and what you have tried, so we can offer advice that helps. As it is, we have no idea what you are after. Sarah On Mon, May 8, 2017 at 9:21 AM Elahe chalabi via R-help < r-help at r-project.org> wrote:> Any idea?! > > On Sunday, May 7, 2017 5:56 PM, Elahe chalabi via R-help < > r-help at 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 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. > > > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. >-- Sarah Goslee http://www.stringpage.com http://www.sarahgoslee.com http://www.functionaldiversity.org [[alternative HTML version deleted]]
Ismail SEZEN
2017-May-08 13:32 UTC
[R] visualization of KNN results in text classification
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 at 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 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.