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 <[email protected]> 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 <[email protected]> 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 <[email protected]> > wrote: > > How I can use majority guessing function to evaluate KNN, if I have data > saved in CSV file > > > > Alnazer Elbedairy > > > > ______________________________________________ > > [email protected] 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. > ______________________________________________ [email protected] 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.

