similar to: read dataset in R language.

Displaying 20 results from an estimated 300 matches similar to: "read dataset in R language."

2010 Jan 01
1
Questions bout SVM
Hi everyone, Can someone please help me in these questions?: 1)if I use crossvalidation with svm, do I have to use this equation to calculate RMSE?: mymodel <- svm(myformula,data=mydata,cross=10) sqrt(mean(mymodel$MSE)) But if I don’t use crossvalidation, I have to use the following to calculate RMSE: mymodel <- svm(myformula,data=mydata) mytest
2009 Dec 27
1
svm regression/classification
Hi everyone, Can anyone please tell whether there is a difference between the code for using svm in regression and code for using svm in classification? This is my code for regression, should I change it to do classification?: train <- read.table("trainingset.txt",sep=";") test <- read.table("testset.txt",sep=";") svmmodelfitness <-
2003 Dec 06
7
Windows Memory Issues
Hi all, I am currently building an application based on R 1.7.1 (+ compiled C/C++ code + MySql + VB). I am building this application to work on 2 different platforms (Windows XP Professional (500mb memory) and Windows NT 4.0 with service pack 6 (1gb memory)). This is a very memory intensive application performing sophisticated operations on "large" matrices (typically 5000x1500
2009 Dec 29
3
error logging
Yet another question... I'm wondering if there is a built in facility to log errors. I've got this statement that gives me verbose DBI errors as they come up (to standard output), but I'd like to trap and log them to a file as I running about 3000000 sql statements through this particular piece of code and I'd like to keep the loop going and deal with all the errors once the
2012 Nov 29
1
Coerce rownames to factor for ordering
Hi all, I think this might be an easy one but I cannot think of a way to do this other than what I am currently attempting. I simply want to sort my data frame's rownames by a defined vector so that the plots I generate from that vector are in the desired order Consider the test data below: #Create test data DataToPlot.. <- data.frame("Location1" =
2012 Feb 13
2
kernlab - error message: array(0, c(n, p)) : 'dim' specifies too large an array
Hi, For another trainingset I get this error message, which again is rather cryptic to me: Setting default kernel parameters Error in array(0, c(n, p)) : 'dim' specifies too large an array RMate stopped at line 0 of selection Calls: rvm ... .local -> backsolve -> as.matrix -> chol -> diag -> array thanks for any suggestions!
2010 Jun 24
1
help in SVM
HI, GUYS, I used the following codes to run SVM and get prediction on new data set hh. dim(all_h) [1] 2034 24 dim(hh) # it contains all the variables besides the variables in all_h data set. [1] 640 415 require(e1071) svm.tune<-tune(svm, as.factor(out) ~ ., data=all_h, ranges=list(gamma=2^(-5:5), cost=2^(-5:5)))# find the best parameters. bestg<-svm.tune$best.parameters[[1]]
2009 Jul 14
2
SOS! error in GLM logistic regression...
Hi all, Could anybody tell me what happened to my logistic regression in R? mylog=glm(mytraindata$V1 ~ ., data=mytraindata, family=binomial("logit")) It generated the following error message: Error in model.frame.default(Terms, newdata, na.action = na.action, xlev = object$xlevels) : factor 'state1' has new level(s) AP Thank you!
2006 Jan 29
2
SoS! How to predict new values using linear regression models?
Hi all, After trial and error by myself for a few hours, I decide to ask for your help. I have a training set which is a matrix of size 200 x 2, where the two columns denote each independent variable. I have 200 observations. ----------------- ss=data.frame(trainingSet); result=lm(trainingClass~ss$X1+ss$X2); ----------------- where trainingClass denotes the true classes of the training data.
2009 Sep 06
2
Regarding SVM using R
Hi Abbas, Before I try to give you answers, I just want to mention that you should send R related reqests to the R-help list, and not me personally because (i) there's a greater likelihood that it will get answered in a timely manner, and (ii) people who might have a similar problem down the road might benefit from any answer via searching the list archives ... anyway: On Sep 5, 2009, at
2005 Oct 18
1
Memory problems with large dataset in rpart
Dear helpers, I am a Dutch student from the Erasmus University. For my Bachelor thesis I have written a script in R using boosting by means of classification and regression trees. This script uses the function the predefined function rpart. My input file consists of about 4000 vectors each having 2210 dimensions. In the third iteration R complains of a lack of memory, although in each iteration
2010 Feb 07
1
Out-of-sample prediction with VAR
Good day, I'm using a VAR model to forecast sales with some extra variables (google trends data). I have divided my dataset into a trainingset (weekly sales + vars in 2006 and 2007) and a holdout set (2008). It is unclear to me how I should predict the out-of-sample data, because using the predict() function in the vars package seems to estimate my google trends vars as well. However, I want
2010 Oct 19
0
RWeka - Error in model.frame.default - evaluate_Weka_classifier
Hi, First of all, I'm a complete rookie to R (~2 weeks). But anyway, I'm trying to use the RWeka interface for C4.5 (J48) classification. As a proof of concept I'm using the Iris data set to create a training set of 30 instances (10 per species) and use the remaining 120 instances as my test set. This is what I do: trainingIndices <- rep(1:10, 3) + rep(0:2, each=10) * 50
2009 Mar 30
3
Calculating First Occurance by a factor
I'm having difficulty finding a solution to my problem that without using a for loop. For the amount of data I (will) have, the for loop will probably be too slow. I tried searching around before posting and couldn't find anything, hopefully it's not embarrassingly easy. Consider the data.frame, Data, below Data Sub Tr IA FixInx FixTime p1 t1 1 1 200 p1 t1 2
2009 Apr 01
0
smv() in "e1071" and the BreastCancer data from "mlbench"
R-help, I am trying to perform a basic anlaysis of the BreastCancer data from "mlbench" using the svm() function in "e1071". I use the following code library("e1071") library("mlbench") data(BreastCancer) BC <- subset(BreastCancer, select=-Id) pairs(BC) model <- svm(Class ~ ., data=BC, cross=10) ## plot(model, BC, ) tobj <- tune.svm(Class ~ .,
2010 Sep 10
4
for loop help please!
Hi Everyone, I have a 2-dim data.matrix(e.g., table1) in which row1 specifies a range of values. row2 - rown specify the number of times I want to replicate each corresponding value in row1. I can do this with the following function: rep(c(table1[1,]),c(table1[X,])) #where X would go from 2 - n. Now, I can do this manually by changing the values of X and save each resulting array/vector in
2009 Aug 03
2
Truncating based on attribute range and serial no
COnsider the following: Age<-c(48, 57, 56, 76, 76, 66, 70, 14, 7, 3, 62, 62, 30, 10, 7, 53, 44, 29, 46, 47, 15, 13, 84, 77, 26) SerialNo<-c(001147, 005979, 005979, 006128, 006128, 007004, 007004, 007004, 007004, 007004, 007438, 007438,009402,009402, 009402, 012693, 012693, 012693, 014063,014063, 014063, 014063, 014811, 014811,016570) TestSet<-cbind(Age,SerialNo)
2012 Nov 20
3
data after write() is off by 1 ?
I am new to R, so I am sure I am making a simple mistake. I am including complete information in hopes someone can help me. Basically my data in R looks good, I write it to a file, and every value is off by 1. Here is my flow: > str(prediction) Factor w/ 10 levels "0","1","2","3",..: 3 1 10 10 4 8 1 4 1 4 ... - attr(*, "names")= chr
2012 Dec 02
2
How to re-combine values based on an index?
I am able to split my df into two like so: dataset <- trainset index <- 1:nrow(dataset) testindex <- sample(index, trunc(length(index)*30/100)) trainset <- dataset[-testindex,] testset <- dataset[testindex,-1] So I have the index information, how could I re-combine the data using that back into a single df? I tried what I thought might work, but failed with:
2008 Sep 18
4
Strange ! characters inserted into emails
I have never encountered anything like this before, so thought I'd post here and see if anyone can help. We have a java application that sends out notification emails to end-users. The body of the email is some boilerplate text and HTML that is pulled from a database. When the emails are received there are random instances of " !" (that's a space and a bang symbol) inserted