similar to: nnet inappropriate fit for class error

Displaying 20 results from an estimated 5000 matches similar to: "nnet inappropriate fit for class error"

2003 Oct 15
1
nnet: Too many weights?
I am using library(nnet) to train up an ANN with what I believe is a moderately sized dataset, but R is complaining about too many weights: --- > nn.1 <- nnet(t(data), targets, size = 4, rang = 0.1, decay = 5e-4, maxit = 200) Error in nnet.default(t(data), targets, size = 4, rang = 0.1, decay = 5e-04, : Too many (1614) weights > dim(targets) [1] 146 2 > dim(data) ## Note
2010 Jun 17
1
help with nnet
> nnet.fit<-nnet(as.factor(out) ~ ., data=all_h, size=5, rang=0.3, decay=5e-4, maxit=500) # model fitting > summary(nnet.fit) a 23-5-1 network with 126 weights options were - entropy fitting decay=5e-04 HI, Guys, I can not find the manual to describe how the model is built, is there a more detailed description how nnet package works? -- Sincerely, Changbin -- [[alternative
2010 Oct 12
1
need help with nnet
HI, Dear R community, My data set has 2409 variables, the last one is response variable. I have used the nnet after feature selection and works. But this time, I am using nnet to fit a model without feature selection. I got the following error information: > dim(train) [1] 1827 2409 nnet.fit<-nnet(as.factor(out) ~ ., data=train, size=3, rang=0.3, decay=5e-4, maxit=500) # model
2009 Nov 02
1
modifying predict.nnet() to function with errorest()
Greetings, I am having trouble calculating artificial neural network misclassification errors using errorest() from the ipred package. I have had no problems estimating the values with randomForest() or svm(), but can't seem to get it to work with nnet(). I believe this is due to the output of the predict.nnet() function within cv.factor(). Below is a quick example of the problem I'm
2003 Jul 16
1
Help on NNET
Hi, Dear all, I am just starting using R in my work and got some trouble to figure out some of the errors. Can anybody help me? The following is the script: read.csv('pupil.txt',header=TRUE,sep='\t')->pupil samp<-c(1:50, 112:162, 171:220, 228:278) pupil.nn2 <- nnet(Type ~ ., data = pupil, subset = samp, size = 2, rang = 0.1, decay = 5e-4, maxit = 200)
2005 Jul 27
1
how to get actual value from predict in nnet?
Dear All, After followed the help of nnet, I could get the networks trained and, excitedly, get the prediction for other samples. It is a two classes data set, I used "N" and "P" to label the two. My question is, how do I get the predicted numerical value for each sample? Not just give me the label(either "N" or "P")? Thanks! FYI: The nnet example I
2007 Jul 15
1
NNET re-building the model
Hello, I've been working with "nnet" and now I'd like to use the weigths, from the fitted model, to iterpret some of variables impornatce. I used the following command: mts <- nnet(y=Y,x=X,size =4, rang = 0.1, decay = 5e-4, maxit = 5000,linout=TRUE) X is (m x n) Y is (m x 1) And then I get the coeficients by: Wts<-coef(mts) b->h1 i1->h1
2007 Dec 14
2
train nnet
Hi R-helpers, Can some one tell me how to train 'mynn' of this type?: mynn <- nnet(y ~ x1 + ..+ x8, data = lgist, size = 2, rang = 0.1, decay = 5e-4, maxit = 200) I assume that this nn is untrained, and to train I have to split the original data into train:test data set, do leave-one-out refitting to refine the weights (please straighten this up if I was wrong). I just don't know
2009 May 29
1
final value of nnet with censored=TRUE for survival analysis
Hi there, I´ve a question concerning the nnet package in the area of survival analysis: what is the final value, which is computed to fit the model with the following nnet-c all: net <- nnet(cat~x, data=d, size=2, decay=0.1, censored=TRUE, maxit=20, Wts=rep(0,22), Hess=TRUE) where cat is a matrix with a row for each record and
2001 Nov 26
1
predict.nnet (PR#1181)
Full_Name: Jeff Schwarz Version: R1.3.1 OS: Windows 2000 Submission from: (NULL) (129.22.170.115) Error message (using predict and predict.nnet) > predict (smalltest, smallx[-jj,]) Error in matrix(NA, length(keep), nout, dimnames = list(rn, dimnames(object$fitted)[[2]])) : length of dimnames[1] not equal to array extent *** all relevant code and data source is given below *** I
2005 Oct 11
1
an error in my using of nnet
Hi, there: I am trying nnet as followed: > mg.nnet<-nnet(x=trn3[,r.v[1:100]], y=trn3[,209], size=5, decay = 5e-4, maxit = 200) # weights: 511 initial value 13822.108453 iter 10 value 7408.169201 iter 20 value 7362.201934 iter 30 value 7361.669408 iter 40 value 7361.294379 iter 50 value 7361.045190 final value 7361.038121 converged Error in y - tmp : non-numeric argument to binary operator
2009 Feb 18
1
Training nnet in two ways, trying to understand the performance difference - with (i hope!) commented, minimal, self-contained, reproducible code
Dear all, Objective: I am trying to learn about neural networks. I want to see if i can train an artificial neural network model to discriminate between spam and nonspam emails. Problem: I created my own model (example 1 below) and got an error of about 7.7%. I created the same model using the Rattle package (example 2 below, based on rattles log script) and got a much better error of about
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
2010 Nov 26
1
Issues with nnet.default for regression/classification
Hi, I'm currently trying desperately to get the nnet function for training a neural network (with one hidden layer) to perform a regression task. So I run it like the following: trainednet <- nnet(x=traindata, y=trainresponse, size = 30, linout = TRUE, maxit=1000) (where x is a matrix and y a numerical vector consisting of the target values for one variable) To see whether the network
2009 Jun 07
1
Inf in nnet final value for validation data
Hi, I use nnet for my classification problem and have a problem concerning the calculation of the final value for my validation data.(nnet only calculates the final value for the training data). I made my own final value formula (for the training data I get the same value as nnet): # prob-matrix pmatrix <- cat*fittedValues tmp <- rowSums(pmatrix) # -log likelihood
2004 Oct 18
1
nnet learning
Hi, I am trying to make a neural network learning a "noisy sine wave". Suppose I generate my data like so.. x <- seq(-2*pi, 2*pi, length=500) y <- sin(x) + rnorm(500, sd=sqrt(0.075)) I then train the neural net on the first 400 points using c <- nnet(as.matrix(x[1:400]),as.matrix(y[1:400]), size=3, maxit=10000, abstol=0.075, decay=0.007) Inspecting the fit of the training
2006 Mar 10
1
need help in tune.nnet
Dear R people, I want to use the tune.nnet function of e1071 package to tune nnet . I am unable to understand the parameters of tune.nnet from the e1071 pdf document. I have performed nnet on a traindata and want to test it for class prediction with a testdata. I want to know the values of size,decay,range etc. parameters for which the prediction of testdata is best. Can anyone please tell me
2012 Sep 21
0
using neural network in R (nnet)
Hi all, I have considered neural network to classify the health status of the cow. I found a very neatly written R codes for classification method in here<http://home.strw.leidenuniv.nl/~jarle/IAC/RRoutines/classification-example.R> . It would be very helpful if you can answer some of the questions, that I am struggling with, I have set of time series data from different animals, I use
2009 Jul 24
1
nnet library and FANN package'm
Hello ! I'd like to know to which of the FANN package network corresponds the R nnet network ? In more details, what is the R nnet activation function, what is the training algorithm (rprop, quickprop, ...) ? Also, it seems that the R nnet "decay" parameter in nnet corresponds to the "learning_rate" parameter in FANN. Correct ? Many thanks in advance ! Luc Moulinier
2010 Sep 07
1
change the for loops with lapply
cv.fold<-function(i, size=3, rang=0.3){ cat('Fold ', i, '\n') out.fold.c <-((i-1)*c.each.part +1):(i*c.each.part) out.fold.n <-((i-1)*n.each.part +1):(i*n.each.part) train.cv <- n.cc[-out.fold.c, c(2:2401, 2417)] train.nv <- n.nn[-out.fold.n, c(2:2401, 2417)] train.v<-rbind(train.cv, train.nv) #training data for feature