search for: datatrain

Displaying 7 results from an estimated 7 matches for "datatrain".

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) Error in randomForest.default(classtrain, datatrain) : length of response must be the same as predictors In addition: Warning message: In randomForest.default(c...
2009 Jun 08
6
Strange indices of support verctors from e1071
Hello, In the attached file training.csv (I apologize for the large file) I have 238 objects belonging to 13 classes, which are described by 183 properties. I would like to find a svm model for these objects. I tried the following R statements. library('e1071') datatraining <- read.csv("training.csv",head=TRUE) names<-names(datatraining) print("before print(names)"); print(names) # There are 186 names, respectively 184 properties P3, P4 ... P1549 data <- subset(datatraining,select=c(-dataname_gen_spec,-Gen)) classes &l...
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 don...
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 features and two classes. And num...
2011 Feb 23
0
svm(e1071) and scaling of weights
...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 <- Glass[-testindex, ] > datatrain <- subset(trainset,select=-Type) > classestrain <- subset(trainset,select=Type) > Wts <- 1.0/table(Glass$Type); > model <- svm(datatrain,classestrain,type="C-classification",kernel="radial",cost=100,class.weights=Wts) > datatest = subset(testset,select...
2008 Jun 17
1
Trouble with FUN(newX[, i], ...)
Hi, I am trying to train svm with some training data of about 4000 rows and 4000 columns. While running svm function I am ending up with the following error. trainfile <- read.csv('0_train_0016435.csv',head=TRUE,na.strings = "NULL") datatrain <- subset(trainfile,select=c(-Class)) model <- svm(datatrain, kernel="radial") Error in FUN(newX[, i], ...) : 'x' is empty I tried substituting "NULL" strings in the data with some numeric values but still I am ending up with error as: model <- svm(datatrain,...
2008 Mar 07
2
training svm
...rain 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 'F113'.... [... truncated] Is there any way to overcome this problem? Any suggestions would be highly helpful. Regards Soumyadeep --------------------------------- [[alternative HTML version deleted]]