Displaying 4 results from an estimated 4 matches for "cvnn2".
2004 Jun 14
2
CVnn2 + nnet question
Hi,
I am trying to determine the number of units in the hidden layer
and the decay rate using the CVnn2 script found in MASS directory
(reference: pg 348,MASS-4).
The model that I am using is in the form of Y ~ X1 + X2 + X3...
+ X11 and the underlying data is time-series in nature.
I found the MASS and nnet package extremely useful (many thanks
to the contributors).
However I am getting an er...
2004 Mar 30
1
classification with nnet: handling unequal class sizes
I hope this question is adequate for this list
I use the nnet code from V&R p. 348: The very nice and general function
CVnn2() to choose the number of hidden units and the amount of weight
decay by an inner cross-validation- with a slight modification to use it
for classification (see below).
My data has 2 classes with unequal size: 45 observations for classI and
116 obs. for classII
With CVnn2 I get the following conf...
2004 Sep 23
0
nnet with weights parameter: odd error
Dear R-users
I use nnet for a classification (2 classes) problem. I use the code
CVnn1, CVnn2 as described in V&R.
The thing I changed to the code is: I define the (class) weight for each
observation in each cv 'bag' and give the vector of weights as parameter
of nnet(..weights = weight.vector...)
Unfortunately I get an error during some (but not all!) inner-fold cv runs:...
2004 Sep 23
0
nnet and weights: error analysis using V&R example
...0
cat("error rate = ",
round(100*sum(tab)/length(list(...)[[1]]), 2), "%\n")
invisible()
}
set.seed(123)
rand <- sample(10, dim(fgl)[1], replace = T)
fgl1 <- fgl
fgl1[1:9] <- lapply(fgl[, 1:9], function(x) {r <- range(x); (x -
r[1])/diff(r)})
CVnn2 <- function(formula, data,
size = c(0,4,4,10,10), lambda = c(0, rep(c(0.001,
0.01),2)),
nreps = 1, nifold = 5, verbose = 99, ...)
{
CVnn1 <- function(formula, data, nreps=1, ri, verbose, ...)
{
totalerror <- 0
truth <-...