similar to: help with nnet

Displaying 20 results from an estimated 4000 matches similar to: "help with nnet"

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
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]]
2010 May 05
2
probabilities in svm output in e1071 package
svm.fit<-svm(as.factor(out) ~ ., data=all_h, method="C-classification", kernel="radial", cost=bestc, gamma=bestg, cross=10) # model fitting svm.pred<-predict(svm.fit, hh, decision.values = TRUE, probability = TRUE) # find the probability, but can not find. attr(svm.pred, "probabilities") > attr(svm.pred, "probabilities") 1 0 1 0 0 2 0
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
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
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
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
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 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
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
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
2011 Jun 01
1
nnet inappropriate fit for class error
Hi, I am trying to run a nnet algorithm but when I try to use the predict function with type='class', it gives the following error: fit <- nnet(y~., size = 1, data = train.set, rang = 0.5, maxit=200, decay = 0) predict<-predict(fit,test.set,type='class') Error in predict.nnet(fit, test.set, type = "class") : inappropriate fit for class I couldn't figure
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
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
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)
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
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
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
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
2010 Jun 17
0
help with neural network nnet package
HI, Dear R community, I am using the nnet to fit a neural network model to do classification on binary target variable (0, 1). I am using the following codes: nnet.fit<-nnet(as.factor(out) ~ ., data=train, size=5, rang=0.3, decay=5e-4, maxit=500) I want to know what is the activation function for the original inputs, is it sigmoid activation function? and what is the output activation