r - Store the summary of kknn into a data.frame -


i have performed kknn operation on data set. want convert summary of operation data.frame. here sample data:

x <- data.frame(a=c(4,2,2,5,2,4), b=c("m","f","m","m","m","m"),                   c=c(53,50,44,47,42,43))   n <- dim(x)[1]   samplevalues <- sample(1:n,size=round(n/3),replace=f,prob=rep(1/n,n))   x.train <- x[-samplevalues,]   x.test <- x[samplevalues,]   x.kknn <- kknn(b~., x.train, x.test, distance=1, kernel="triangular")   

is possible store summary(x.kknn) in data.frame?


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -