Displaying 9 results from an estimated 9 matches for "trainingdata".
2009 Jul 23
1
Activation Functions in Package Neural
...omeone has a suggestion, please advise.
The goal of the network is to properly classify a number as positive or
negative. Simple 1-layer network with a single neuron in each layer.
Rcode:
trainInput <- matrix(rnorm(10))
trainAnswers <- ifelse(trainInput <0, -1, 1)
trainNeurons <- 1
trainingData <- mlptrain(inp=trainInput, neurons=trainNeurons,
out=trainAnswers, it=1000)
## To call this network, we can see how it works on a set of known positive
and negative values
testInput <- matrix(-2:2)
mlp(testInput, trainingData$weight, trainingData$dist, trainingData$neurons,
trainingData$a...
2009 Jul 17
2
Getting the C-index for a dataset that was not used to generate the logistic model
...that I've split into two halves, one for
training the logistic model, and the other for evaluating it. The structure
is as follows:
column headers are "got a loan" (dichotomous), "hourly income" (continuous),
and "owns own home" (dichotomous)
The training data is
*trainingData[1,] = c(0,12,0)*
*...*
etc
and the validation data is
*validationData[1,] = c(1,35,1)*
*...*
etc
I use Prof. Harrell's excellent Design modules to perform a logistic
regression on the training data like so:
*logit.lrm <- lrm(gotALoan ~ hourlyIncome+ownsHome, data=trainingData)*
*lrm(formul...
2012 Nov 15
1
Can't see what i did wrong..
with
pred.pca<-predict(splits[[i]]$pca,trainingData at samples)[,1:nPCs]
dframe<-as.data.frame(cbind(pred.pca,class=isExplosive(trainingData,2)));
results[[i]]$classifier<-ksvm(class~.,data=dframe,scaled=T,kernel="polydot",type="C-svc",
C=C,kpar=list(degree=degree,scale=scale,offset=offset),prob.model=T)
and a degree of...
2011 Apr 18
2
Predicting with a principal component regression model: "non-conformable arguments" error
...23
4 7 type2 30
.....
18 11 type1 45
if I train a PCR model using the training data #2 and try to predict with
the resulting model and the data from "newdata.csv", e.g.,
##################################
trainingdata <- read.csv("mydata_without_train_column.csv", header=TRUE)
trainingdata <- data.frame(trainingdata)
testingdata <- read.csv("newdata.csv", header=TRUE)
testingdata <- data.frame(testingdata)
pcrmodel2 <- pcr(response ~ var1+var2+var3, data = trainingdata)
pr...
2010 Dec 21
1
randomForest: tuneRF error
Just curious if anyone else has got this error before, and if so,
would know what I could do (if anything) to get past it:
> mtry <- tuneRF(training, trainingdata$class, ntreeTry = 500, stepFactor = 2, improve = 0.05, trace = TRUE, plot = TRUE, doBest = FALSE)
mtry = 13 OOB error = 0.62%
Searching left ...
mtry = 7 OOB error = 1.38%
-1.222222 0.05
Searching right ...
mtry = 26 OOB error = 0.24%
0.6111111 0.05
mtry = 52 OOB error = 0.07%
0...
2009 Jan 15
2
problems with extractPrediction in package caret
...quot;, returnResamp = "all", returnData=TRUE, verboseIter = TRUE)
rftrain <- train(x=train_x, y=trainclass, method="rf", tuneGrid=tuneGrid, tr.control=rfControl)
pred <- predict(rftrain)
pred # this works fine
expred <- extractPrediction(rftrain)
Error in models[[1]]$trainingData :
$ operator is invalid for atomic vectors
My predictors are 28 numeric attributes and one factor.
I`m working with the latest version of caret and R 2.7.2 on WinXP.
Any advice is very welcome.
Thanks.
TIM
-------------------------------------------------------------------------------
Dipl...
2010 Jul 10
4
eliminating constant variables
...ppears in the data there are a lot
of fields that are constant or all missing values - which prevents the model
from being built.
Can someone point me the right direction as to how I can automatically purge
my data file of these useless fields.
Thanks in advance,
pdb
train <- read.csv("TrainingData.csv")
library(gbm)
i.gbm<-gbm(TargetVariable ~ . ,data=train,distribution="bernoulli.....
1: In gbm.fit(x, y, offset = offset, distribution = distribution, ... :
variable 5: var1 has no variation.
--
View this message in context: http://r.789695.n4.nabble.com/eliminating-constant-...
2012 Jul 30
6
Convert variable to STring
Dear all,
I have a variable that I would like also to use it as a string. The reasons is that I want to collect results from different function to one table.. So when I use the
colnames(mymatrix) <-c(function1.function2,function3)
the function1, function2, function3 to be "converted" to simple strings so as
colnames(mymatrix)
2009 Jun 08
3
caret package
Hi all
I am using the caret package and having difficulty in obtaining the results
using regression, I used the glmnet to model and trying to get the
coefficients and the model parameters I am trying to use the
extractPrediction to obtain a confusion matrix and it seems to be giving me
errors.
x<-read.csv("x.csv", header=TRUE);
y<-read.csv("y.csv", header=TRUE);