search for: linout

Displaying 20 results from an estimated 32 matches for "linout".

Did you mean: inout
2011 Jan 05
0
Nnet and AIC: selection of a parsimonious parameterisation
...ctions attach(cpus2) cpus3 <- data.frame(syct = syct-2, mmin = mmin-3, mmax = mmax-4, cach=cach/256,chmin=chmin/100, chmax=chmax/100, perf) detach() CVnn.cpus <- function(formula, data = cpus3[cpus.samp, ], maxSize = 10, decayRange = c(0,0.2), nreps = 5, nifold = 10, alpha= 9/10, linout = TRUE, skip = TRUE, maxit = 1000,...){ #nreps=number of attempts to fit a nnet model with randomly chosen initial parameters # The one with the smallest RSS on the training data is then chosen nnWtsPrunning <-function(nn,data,alpha,i){ truth <- log10(data$perf) RSS=(1-alpha)*...
2006 Sep 11
2
Translating R code + library into Fortran?
....scale","exp.shape") cell.size=20 sim.size=600 #first train initial neural nets training.data=data.gen(1e4,cell.size,cell.size,.1,1,.1,1,1,4) #train nn.shift with error checking ok=F while(ok==F){ nn1.shift=nnet(exp.shift~min+q1+med+mean+q3+max+samples,data=training.data,size=8,linout=T,rang=1e-08,maxit=500,trace=F) cor.shift=predict(nn.shift,training.data[,c(1:7)],type="raw") temp=hist(cor.shift,plot=F) if(length(temp$counts[temp$counts>0])>10){ ok=T } } #train nn.scale with error checking ok=F while(ok==F){ nn1.scale=nnet(exp.scale~...
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 learnt anything at all, I checked the network weights and those have definitely changed. However, when examining the trainednet$fitted.values, those are al...
2009 May 24
2
accuracy of a neural net
...mple I got 980 out of 982 correct. Can anyone spot an error here? crs$dataset <- read.csv("file:///C:/dataForR/textsTweet1/cleanForPC.csv", na.strings=c(".", "NA", "", "?")) crs$nnet <- nnet(Value ~ ., data=crs$dataset[,c(1:22,922)], size=10, linout=TRUE, skip=TRUE, trace=FALSE, maxit=1000) targets=crs$dataset[,922] rawpredictions =predict(crs$nnet, crs$dataset[, c(1:22)], type="raw") roundedpredictions=round(rawpredictions[,1],digits = 0) trueAndPredicted=cbind(roundedpredictions, targets) howManyEqual=trueAndPredicted[,1]==tru...
2012 Oct 17
0
Superficie de respuesta con rsm y nnet
...e es significativa, decidí probar con una red neural artificial, usando los paquetes "caret" y "nnet". He probado las siguientes opciones: NN.1 <- train(R ~ V1 + V2, data = DATOS.Codificados, method = "nnet", maxit = 10000, tuneGrid = SIZE.DECAY, trace = F, linout = TRUE) donde R² = 0.9936, y AAD = 4.87 %, pero la forma de la superficie de respuesta es muy irregular, nada parecida al modelo obtenido con "rsm". NN.2 <- train(R ~ V1 + V2 + V1:V2, data = DATOS.Codificados, method = "nnet", maxit = 10000, tuneGrid = SIZE.DECAY, tra...
2008 Jul 03
2
Plotting Prediction Surface with persp()
...a question about correct usage of persp(). I have a simple neural net-based XOR example, as follows: library(nnet) xor.data <- data.frame(cbind(expand.grid(c(0,1),c(0,1)), c(0,1,1,0))) names(xor.data) <- c("x","y","o") xor.nn <- nnet(o ~ x + y, data=xor.data, linout=FALSE, size=1) # Create an (x.y) surface and predict over all points d <- data.frame(expand.grid(seq(0,1,.1), seq(0,1,.1))) names(d) <- c("x","y") p <- predict(xor.nn, d) zmat <- as.matrix(cbind(d,p)) Now my z matrix consists of x and y points, and the correspondin...
2003 Aug 19
3
On the Use of the nnet Library
...s of 20 observations with four variables: Sex, Age, Height and Weight. Sex is treated as a factor, Age and Weight are variables normalized to unity, as usual. I wanted to construct a neural network, and so I ran the following code: >library(nnet) >net1<-nnet(Weight~Age+Sex+Height, size=2, linout=T,maxit=1000) I repeated this thirteen times. I used the default initial parameters unless otherwise noted. The result is as follows, where init and final mean initial and final RSS's, and NIT means the number of iterations before reaching convergence or noncovergence: Run# init NIT final 1...
2007 Jan 28
2
nnet question
...y code(see following) several time, but I get different correlation coefficient each time. Anyone know why? In addition, How to calculate prediction accuracy for prediction of continuous variable? Aimin thanks, > m.nn.omega <- nnet(omega~aa_three+bas+bcu+aa_ss, data=training, size=2, linout=TRUE) # weights: 57 initial value 89153525.582093 iter 10 value 15036439.951888 iter 20 value 15010796.121891 iter 30 value 15000761.804392 iter 40 value 14955839.294531 iter 50 value 14934746.564215 iter 60 value 14933978.758615 iter 70 value 14555668.381007 iter 80 value 14553072.231507...
2007 Mar 27
1
Using nnet
I have a problem when using nnet to predict the negative values. For example : X = matrix(c(1,1,0,0,1,0,1,0),4,2) X Y = matrix(c(0,1,1,0)) - 0.5 # XOR - 0.5 Y nn = nnet(X,Y,size=3) val = predict(nn,X) val # this is expected to be close to Y, but it's not ! The 'val' is always positive. I tried to change the options, but the result isn't much better. Could someone give me an
2008 Apr 26
1
Variables selection in Neural Networks
...en layer to control overfitting. But, to select the best model how I can choose the relevant variables? How I can eliminate those that are not significant for the model of neural networks? How I can do this in R? dataset.nn=nnet(response.variable~., dataset, subset = training, size=1, decay=0.001, linout=F, skip=T, maxit=200, Hess=T) What I am doing is to vary size between 0 and 1 since with a single layer it can learn any type of function or continuous relation between a group of input and output variables. But this only would give two different models. The ideal would be to be reducing nonsignif...
2003 Jul 11
2
Nonliner Rgression using Neural Nnetworks
Hi, I am an old hand at chemistry but a complete beginner at statistics including R computations. My question is whether you can carry out nonlinear multivariate regression analysis in R using neural networks, where the output variable can range from -Inf to + Inf., unlike discriminant analysis where the output is confined to one or zero. The library nnet seems to work only in the latter
2004 Nov 29
0
R: nnet questions
...1] 413.999148 405.009358 418.679828 418.388427 419.282955 432.329471 433.448313 444.166060 447.773185 455.103503 [91] 448.588598 464.410358 465.565875 478.677403 478.306390 479.565728 487.681689 491.422090 502.468491 500.385458 i then went about to use the nnet function: > a.net<-nnet(y~x,linout=T,size=1) # weights: 4 initial value 8587786.130082 iter 10 value 2086583.979646 final value 2079743.529111 converged NOTE: the function said that four weights were estimated. This is correct as shown below. the model can be represented as: input ---(w1)---> hidden ---(w2)--->...
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 i2->h1 i3->h1 i4->h1 i5->h1 i6->h1 i7->h1 ... b->o h1->o h2->o h3->o h4->o ... I unde...
2004 Sep 03
2
windowing strategies
Hello to everybody, Does anyone has implemented a function for evaluating models using windowing strategies, such as growing window or sliding window ones? The aim is to evaluate regression models on a time series data. I do not use cross-validation once data sorted in a radom way does not make sense when evaluating time series. Thanks Joao Moreira
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
2012 Mar 01
3
how to change or copy to another the names of models
Hi I would like to know how I can change the name of a model for each trainning cycle of a model. I work with the RSNNS package and to build a neural network, I used : for (i in 5:30) .... model_ANN <- mlp(X, Y, size=n,....) # where size is the number of neurons in the hidden layer but I need to save each time that the model that is build (the end of each cycle), e.g., when i = 5, I need to
2012 May 30
1
caret() train based on cross validation - split dataset to keep sites together?
...+ tempd + tempe + netarea + netbuffor + strmslope + netsoilprm + netslope + gwndx + mnaspect + urb + ag + forest + buffor + tempa7day + tempb7day + tempc7day + tempd7day + tempe7day + tempa30day + tempb30day + tempc30day + tempd30day + tempe30day, data = temp.train, method = "nnet", linout=T, maxit = 100, MaxNWts = 100000, metric = "RMSE", trControl = fitControl, tuneGrid = tuning, trace = T)
2009 May 27
3
Neural Network resource
Hi All, I am trying to learn Neural Networks. I found that R has packages which can help build Neural Nets - the popular one being AMORE package. Is there any book / resource available which guides us in this subject using the AMORE package? Any help will be much appreciated. Thanks, Indrajit
2006 Dec 03
1
nnet() fit criteria
Hi all, I'm using nnet() for non-linear regression as in Ch8.10 of MASS. I understand that nnet() by default optimizes least squares. I'm looking to have it instead optimize such that the mean error is zero (so that it is unbiased). Any suggestions on how this might be achieved? Cheers, Mike -- Mike Lawrence http://artsweb.uwaterloo.ca/~m4lawren "The road to wisdom? Well,
2012 Jan 04
0
Error formal argument "softmax" matched by multiple actual arguments
...come,size=3,softmax=TRUE) This returns the error message : formal argument "softmax" matched by multiple actual arguments Here the dependent variable "custcat" is a factor with 4-levels. This error does not crop up for any other arguments of nnet(), including entropy=TRUE, linout=TRUE and censored=TRUE This post : http://userprimary.net/posts/2010/03/16/reentrant-bugs-without-concurrency/ http://userprimary.net/posts/2010/03/16/reentrant-bugs-without-concurrency/ identifies the error message formal argument "< >" matched by multiple actual arguments...