Displaying 3 results from an estimated 3 matches for "sknn".
Did you mean:
skin
2010 Mar 09
1
create picture (k -the nearest neighbours)
Hi
I want to create a nice picture about my result of k -the nearest neighbours
algorithm. Here is my easy code:
#################################
library(klaR)
library(ipred)
library(mlbench)
data(PimaIndiansDiabetes2)
dane=na.omit(PimaIndiansDiabetes2)[,c(2,5,9)]
dane[,2]=log(dane[,2])
dane[,1:2]=scale(dane[,1:2])
zbior.uczacy=sample(1:nrow(dane),nrow(dane)/2,F)
2009 Oct 27
1
"ipredknn" - How may I find values?
...e[-zbior.uczacy,],"class")
#data frames with my result from klasyfikatorKNN
df=data.frame(glucose=c(klasyfikatorKNN$learn$X[,1]),insulin=klasyfikatorKNN$learn$X[,2],diabetes=c(klasyfikatorKNN$learn$y))
#And picture
drawparti(as.factor(df$diabetes), df$glucose, df$insulin, method = "sknn",
prec = 100, xlab = NULL, ylab = NULL)
##########################
My question is: How or where may I find correct or wrong values which were
drawn (found,classification) in this picture? It means I'm looking for x, y
values.
--
View this message in context: http://www.nabble.com/%...
2005 Jul 05
1
Getting runtime error in stepclass
Hi!
I got the following runtime error when I tried to use svm method with
stepclass.
Error in "colnames<-"(`*tmp*`, value = c("0", "1")) :
attempt to set colnames on object with less than two dimensions
I repeated the same sequence of statements but this time I used the
classification function used in the example, i.e., "lda" and it worked
fine