Displaying 2 results from an estimated 2 matches for "votematrix".
Did you mean:
rotmatrix
2012 Oct 17
0
Svm modeling :: Error in which.max(votematrix[, x]) : subscript out of bounds
...as well as categorical variables. I got error
while predicting with predict method.
svp3c <- ksvm(input_dataset3$isCRgt3~., data=input_dataset3,type="C-svc")
p3<-predict(svp3c,newdata=input_dataset_prediction[,-1],type="response")
error :: Error in which.max(votematrix[, x]) : subscript out of bounds
For this modeling
First : developed model with training dataset
second : saved and Load model for prediction on testing dataset
Here is my script sample ::
-----------------------------------------------------sample
Script----------------------------------------...
2009 Apr 28
1
kernlab - custom kernel
...ne[c(6), -1])
# but the same code fails to work with iris dataset
library("kernlab")
s <- function(x, y) {
sum((x*y)^1.25)
}
class(s) <- "kernel"
gene <- ksvm(Species ~ ., data = iris,kernel = s, C = 10, cross = 5)
# above code gives the following error:
Error in votematrix[i, ret < 0] <- votematrix[i, ret < 0] + 1 :
NAs are not allowed in subscripted assignments
Thank you very much for your time and attention.
Sincerely,
Vivek
Banaras Hindu University,
India.
[[alternative HTML version deleted]]