Questions tagged [nnet]

software for feed-forward neural networks and multinomial log-linear models.

nnet refers to the software for feed-forward neural networks with a single hidden layer, and for multinomial log-linear models.

40 questions
15
votes
1 answer

How to deal with a mix of binary and continuous inputs in neural networks?

I'm using the nnet package in R to attempt to build an ANN to predict real estate prices for condos (personal project). I am new to this and don't have a math background so please bare with me. I have input variables that are both binary and…
9
votes
2 answers

Example of time series prediction using neural networks in R

Anyone's got a quick short educational example how to use neural networks (nnet in R for example) for the purpose of prediction? Here is an example, in R, of a time series T <- seq(0,20,length=200) Y <- 1 + 3*cos(4*T+2) +.2*T^2 +…
dfhgfh
  • 401
  • 1
  • 4
  • 9
8
votes
1 answer

What's the activation function used in the nodes of hidden layer from nnet library in R?

Most references I find say that the activation function used in nnet is 'usually' a logistic function. But in the case that I would like to test the performance of the trained neural network from nnet, it is necessary to know the exact activation…
user35549
  • 81
  • 1
  • 2
7
votes
3 answers

(Feed-Forward) Neural Networks keep converging to mean

I'm having an interesting dilemma with the neuralnet and nnet packages in R. I recently tried a series of feed-forward neural networks giving each the same data sets and every single time, no matter how I tweak the algorithms, hidden layers, neuron…
gtnbz2nyt
  • 225
  • 4
  • 9
5
votes
0 answers

How to control the learning rate in R nnet?

I am dealing with the nnet package in R. I know that the momentum $\alpha$ is used to decrease the fluctuations in weight changes over consecutive iterations. The original update of the weights states that: $$\omega_i(t+1) = \omega_i -…
Andrea Ianni ௫
  • 354
  • 2
  • 14
4
votes
0 answers

nnet::multinom confidence intervals extremely narrow, when mean of independent variable >> variance

I am using the package nnet to fit multinomial regression models using multinom(). When fitting the model using an independent variable with much greater mean than variance, the confidence intervals get narrower and the p-value gets smaller. This is…
ndevln
  • 303
  • 2
  • 7
3
votes
1 answer

Neural network for prediction

I am working on neural networks for a regression problem in R using packages like nnet, caret etc. I have split my data into train, validation and test. My doubt is does the train() function in caret package for R takes care for validation set…
NG_21
  • 1,436
  • 3
  • 17
  • 25
3
votes
1 answer

Is it valid to use Anova (in R) to compare alternative multinomial log-linear models?

I am familiar with the idea of comparing alternative linear regression models using anova(model1,model2), for models fitted using lm() in R. For example, I might use this function to test if it was worth adding an $X^2$ term to a linear model. I am…
Izy
  • 579
  • 5
  • 17
3
votes
2 answers

Do I have to preprocess my new data for a prediction, if I have used preprocessing for building the model?

In this example preprocessing is used to construct a NN: nnetTune <- train(x = solTrainXtrans, y = solTrainY, method = "avNNet", tuneGrid = nnetGrid, trControl = ctrl, preProc = c("center",…
Marcel
  • 89
  • 2
  • 8
3
votes
0 answers

multinomial logistic regression with nnet package in R

I have recently realised that the way I thought the multinom function in nnet was running is not actually the way it is coded. I have looked high and low for information on how the models are actually created with regards to baseline, continuous…
PeteKaz
  • 31
  • 4
3
votes
1 answer

What is the "value of fitting criterion" on the nnet package in R?

When you run the function nnet of the nnet package a sequence of values is shown on the console like this (made up numbers): initial value 100 iter 10 value 88 iter 20 value 80 final value 60 And it shows "Converged" at the end if the net did…
Makondo
  • 211
  • 1
  • 7
3
votes
2 answers

Training nnet and avNNet models with caret when the output has negatives

My question is about the typical feed-forward single-hidden-layer backprop neural network, as implemented in package nnet, and trained with 'train()' in package caret. This is related to this question [Multi-layer neural network wont predict…
bsbk
  • 1,127
  • 11
  • 19
2
votes
0 answers

How to Obtain “Right” Parameters of Multinomial Logit Model (or Other Conditional Models) in R?

I started to use the function multinom of R package nnet in order to fit several conditional probability distributions with the multinomial logistic model. I need the parameters of the fittings in order to pass them to a Java program, which will…
Pippo
  • 587
  • 1
  • 6
  • 14
2
votes
1 answer

Differences between multinomial models (mgcv and nnet)

I'm trying to understand the differences I see when applying multinomial logistic regression models in R using nnet and mgcv. For comparison purposes with glm() let's take only two levels for the dependent variable. The additive model success ~…
2
votes
0 answers

Case weights vs probability weights

I use functions in R as context for the question, but it is more generally about the meaning of two terms used to describe weights applied to cases in regression models. In lm, the "weights" argument triggers WLS fitting to minimize the sum of the…
bsbk
  • 1,127
  • 11
  • 19
1
2 3