How I can use majority guessing function to evaluate KNN, if I have data saved in CSV file Alnazer Elbedairy
Your question is too vague. What do you know about R? What do you know about KNN? What have you tried so far? You need to teach yourself enough about R to ask a more specific question. To get started, read some of these: Contributed Documentation (https://cran.r-project.org/other-docs.html) * "Using R for Data Analysis and Graphics - Introduction, Examples and Commentary" by John Maindonald (https://cran.r-project.org/doc/contrib/usingR.pdf) * "R for Beginners" by Emmanuel Paradis (https://cran.r-project.org/doc/contrib/Paradis-rdebuts_en.pdf) * "Kickstarting R (version 1.6)" compiled by Jim Lemon (https://cran.r-project.org/doc/contrib/Lemon-kickstart/index.html) Then some of these * Data Mining Algorithms In R/Classification/kNN (https://en.wikibooks.org/wiki/Data_Mining_Algorithms_In_R/Classification/kNN) * Machine Learning in R for beginners (https://www.datacamp.com/community/tutorials/machine-learning-in-r) * Best way to learn kNN Algorithm using R Programming (http://www.analyticsvidhya.com/blog/2015/08/learning-concept-knn-algorithms-programming/) ------------------------------------- David L Carlson Department of Anthropology Texas A&M University College Station, TX 77840-4352 -----Original Message----- From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Alnazer Sent: Tuesday, February 23, 2016 2:03 PM To: r-help at r-project.org Subject: [R] KNN How I can use majority guessing function to evaluate KNN, if I have data saved in CSV file Alnazer Elbedairy ______________________________________________ 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.
Hi Alnazar, I looked at your question yesterday and was unable to find what a "majority guessing" function is. I think it may be related to the "Pandemonium" model of decision making, but that doesn't get me very far. Could you give us a hint as to what this function is? Jim On Wed, Feb 24, 2016 at 7:02 AM, Alnazer <alnazer.elbedairy at gmail.com> wrote:> How I can use majority guessing function to evaluate KNN, if I have data saved in CSV file > > Alnazer Elbedairy > > ______________________________________________ > 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.
Dear Jim thanks you for your kind help. KNN - is K- Nearest Neighbor, is a technique used in Machine Learning. attached you will find a CSV file dataset, my question is : use the attached Dataset, Use majority guessing technique to evaluate KNN ? this is the solution I came up with, but I didn't work :- majorityGuessing <- function(trainingData,categories) {GuessMPG <- sample(1:length (categories-1, nrow(testingData),replace=T) return(GuessMPG) On Wed, Feb 24, 2016 at 8:18 PM, Jim Lemon <drjimlemon at gmail.com> wrote:> Hi Alnazar, > I looked at your question yesterday and was unable to find what a > "majority guessing" function is. I think it may be related to the > "Pandemonium" model of decision making, but that doesn't get me very > far. Could you give us a hint as to what this function is? > > >On Wed, Feb 24, 2016 at 8:18 PM, Jim Lemon <drjimlemon at gmail.com> wrote:> Hi Alnazar, > I looked at your question yesterday and was unable to find what a > "majority guessing" function is. I think it may be related to the > "Pandemonium" model of decision making, but that doesn't get me very > far. Could you give us a hint as to what this function is? > > Jim > > > On Wed, Feb 24, 2016 at 7:02 AM, Alnazer <alnazer.elbedairy at gmail.com> > wrote: > > How I can use majority guessing function to evaluate KNN, if I have data > saved in CSV file > > > > Alnazer Elbedairy > > > > ______________________________________________ > > 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. >