similar to: Trouble with FUN(newX[, i], ...)

Displaying 20 results from an estimated 9000 matches similar to: "Trouble with FUN(newX[, i], ...)"

2008 Jul 03
1
randomForest.error: length of response must be the same as predictors
My data looks like: A,B,C,D,Class 1,2,0,2,cl1 1,5,1,9,cl1 3,2,1,2,cl2 7,2,1,2,cl2 2,2,1,2,cl2 1,2,1,5,cl2 0,2,1,2,cl2 4,2,1,2,cl2 3,5,1,2,cl2 3,2,12,3,cl2 3,2,4,2,cl2 **The steps followed are: trainfile <- read.csv("TrainFile",head=TRUE) datatrain <- subset(trainfile,select=c(-Class)) classtrain <- (subset(trainfile,select=Class)) rf <- randomForest(datatrain, classtrain)
2011 Feb 23
0
svm(e1071) and scaling of weights
I expected, that I will get the same prediction, if I multiply the weights for all classes with a constant factor, but I got different results. Please look for the following code. > library(e1071) > data(Glass, package = "mlbench") > index <- 1:nrow(Glass) > testindex <- sample(index, trunc(length(index)/5)) > testset <- Glass[testindex, ] > trainset <-
2008 Mar 07
2
training svm
What should I do if I need to train svm() with data having same value across all rows in some columns. These must be the important features of the class and we cant exclude these columns to build up models. The error I am getting is: Error in predict.svm(ret, xhold) : Model is empty! In addition: Warning message: In svm.default(datatrain, classtrain) : Variable(s) 'F112' and
2008 Jul 02
1
randomForest training error
While trying to train randomForest with my dataset, I am ending up with the following error Error in randomForest.default(datatrain, classtrain) : length of response must be the same as predictors My data looks like: A,B,C,D,Class 1,2,1,2,cl1 1,2,1,2,cl1 3,2,1,2,cl2 3,2,1,2,cl2 3,2,1,2,cl2 3,2,1,2,cl2 3,2,1,2,cl2 3,2,1,2,cl2 3,2,1,2,cl2 3,2,12,3,cl2 3,2,1,2,cl2 Actual dataset has around 4000
2013 Mar 23
1
Error with custom function in apply: ”Error in FUN(newX[, i], ...) : unused argument(s) (newX[, i])”
Hi everyone, I wonder if I can get your help using a custom function in apply. Imagine the following dataframe called "data": LowLim HighLim A1 A2 A3 A4 4 6 3 4 5 6 4 6 4 5 5 6 2 3 1 4 2 3 2 3 NA NA NA NA We have created a custom function (see below) that takes the values in a given row between columns A1 to A4 to see if they are outside the limits in the same
2017 Sep 26
0
Surprising message "Error in FUN(newX[, i], ...) : all arguments must have the same length"
Hi Chris, Maybe the na.rm=TRUE is affecting things. Try this apply(datTAF[,75:78],2,function(x){ sum(!is.na(x)) }) HTH, Eric On Tue, Sep 26, 2017 at 9:53 AM, Chris Evans <chrishold at psyctc.org> wrote: > I am hitting an odd message "Error in FUN(newX[, i], ...) : all arguments > must have the same length". I can't supply the data as it's a huge data > frame
2008 May 06
0
Error in FUN(newX[, i], ...) : no complete element pairs in R 2.7.0 patched
Using R 2.6.0 patched I was able to calculate the variance of each row of a matrix without error, even if some rows had only NAs. I would just get NAs back as the variance for those rows. Now with R 2.7.0 patched I get an error "no complete element pairs" if any one row has all NAs. Can anyone tell if I can make R 2.7.0 patched behave as R 2.6.0 did so I don't have to change all my
2010 Feb 18
3
svm regression
Hi, I am trying to use svm for regression data. this is how my data looks like: >dataTrain x y z 1 4 6 2 5 4 3 7 5 >classTrain a 2 3 4 >dataTest x y z 1 7 2 2 8 3 >classTest a 3 4 5 building the model model<-svm(dataTrain,classTrain,type="nu-regression") pred <- predict(model, dataTest) > pred 1 2 3.008842 3.120078 I
2017 Sep 26
2
Surprising message "Error in FUN(newX[, i], ...) : all arguments must have the same length"
I am hitting an odd message "Error in FUN(newX[, i], ...) : all arguments must have the same length". I can't supply the data as it's a huge data frame but I think this has enough diagnostic information to show the issue. I am sure I am missing something obvious. I've put some extra comments in but otherwise this is cut and pasted from Rstudio. ### I wanted a table of the
2008 Jan 02
1
Plot.svm error
Hi all, Sorry to be bothering again with probably an easy error to fix, but I've been trying to solve the problem and haven't been able yet to do it. So I'm doing this: > dados<-read.table("b.txt",sep="",nrows=30000) >
2004 Dec 01
1
tuning SVM's
Hi I am doing this sort of thing: POLY: > > obj = best.tune(svm, similarity ~., data = training, kernel = "polynomial") > summary(obj) Call: best.tune(svm, similarity ~ ., data = training, kernel = "polynomial") Parameters: SVM-Type: eps-regression SVM-Kernel: polynomial cost: 1 degree: 3 gamma: 0.04545455 coef.0: 0
2008 Jan 03
0
Svm formula
Hi all, I don't know how to choose the formula to use when plotting an svm model, I think I'm using the wrong one and so that is why I'm having trouble. I should be very grateful if someone could help me on this.. > dados<-read.table("b.txt",sep="",nrows=30000) >
2011 Feb 18
1
segfault during example(svm)
If do: > library("e1071") > example(svm) I get: svm> data(iris) svm> attach(iris) svm> ## classification mode svm> # default with factor response: svm> model <- svm(Species ~ ., data = iris) svm> # alternatively the traditional interface: svm> x <- subset(iris, select = -Species) svm> y <- Species svm> model <- svm(x, y) svm>
2009 May 11
1
Problems to run SVM regression with e1071
Hi R users, I'm trying to run a SVM - regression using e1071 package but the function svm() all the time apply a classification method rather than a regression. svm.m1 <- svm(st ~ ., data = train, cost = 1000, gamma = 1e-03) Parameters: SVM-Type: C-classification SVM-Kernel: radial cost: 1000 gamma: 0.001 Number of Support Vectors: 209
2013 Jan 08
0
bagging SVM Ensemble
Dear Sir, I got a problem with my program. I would like to classify my data using bagging support vector machine ensemble. I split my data into training data and test data. For a given data sets TR(X), K replicated training data sets are first randomly generated by bootstrapping technique with replacement. Next, Support Vector Mechine (SVM) is applied for each bootstrap data sets. Finally, the
2005 Jul 27
2
Error in FUN(newX[, i], ...) : `x' must be atomic
Hello Group, What is the meaning of the error. is there any place to look for this. I guess 'atomic' seems to be OOP related concept. thank you srini
2010 Mar 08
0
error when using svm routine: Error in if (any(co)) { : missing value where TRUE/FALSE needed
Hi, I met with this error message with the following data set. Do you know how to resolve it? Thanks. > data<-read.table("c://temp3//abc.csv", sep = ",", header=T) > classwt<-c( 0.5806452, 0.4193548) > y<-data[,1] > x<-data[,2:ncol(data)] > print(y) [1] 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 1 1 1 1 1 [36] 1 1 1 1 2 2 2 2 2 2
2010 May 05
2
probabilities in svm output in e1071 package
svm.fit<-svm(as.factor(out) ~ ., data=all_h, method="C-classification", kernel="radial", cost=bestc, gamma=bestg, cross=10) # model fitting svm.pred<-predict(svm.fit, hh, decision.values = TRUE, probability = TRUE) # find the probability, but can not find. attr(svm.pred, "probabilities") > attr(svm.pred, "probabilities") 1 0 1 0 0 2 0
2012 Aug 07
1
Interpreting predictions of svm
Hi, I have some difficulties in interpreting the prediction of a svm model using the package e1071. y1 is the variable I want to predict. It is of type factor and has got two levels: "< 50%" and "> 50%". z is the dataset. > model <- svm(y1 ~ ., data = z,type="C-classification", cross=10) > model Call: svm(formula = y1 ~ ., data = z, type =
2010 May 13
1
tune svm
Hello, I hope you can help me! I`m trying to tune svm parameters: cost and gamma for a landsat image classification, but I get an error and I can't understand it. I write this: > tune(svm, Class~., data = mdt01bis, ranges = list(gamma = 2^(-15:3), cost > = 2^(-5:15))) and R gives: Error en predict.svm(model, if (!is.null(validation.x)) validation.x else if (useFormula)