Questions tagged [nnet]

Software for feed-forward neural networks with a single hidden layer, and for multinomial log-linear models.

167 questions
2
votes
1 answer

R attribute ".Environment" consuming large amounts of RAM in nnet package

I have a piece of code that that is using the nnet package and I am interested in calculating a number of different neural network models & then saving all the models to disk (with save() ). The issue that I am running into is that the "terms"…
chuck taylor
  • 2,476
  • 5
  • 29
  • 46
2
votes
0 answers

R nnet multiniom (multinomial logistic regression models) - assign penalties to avoid misclassification

I am using multinom from nnet package to fit a logistic regression model to data consists of 3 classes, however the prevalence of the classes is not balanced. I would like to assign weight/penalties in order to tell the model to avoid…
user3628777
  • 529
  • 3
  • 10
  • 20
2
votes
2 answers

Caret Package: All Functions Don't Work for All Models

I have the script below that works fine with the ctree model/party package. When I swap it with the NNET model/package, the varImp and plot(final model) throws an error. I was under the 'assumption' that the helper functions in the caret package…
Steve Olson
  • 183
  • 2
  • 12
2
votes
1 answer

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 but in the context of the nnet and caret packages…
bsbk
  • 180
  • 1
  • 9
2
votes
1 answer

nnet in R, 'softmax = TRUE' requires at least two response categories

I am trying to use nnet in R, and encounter a problem for using softmax. I am trying to builda three layer network, with input layer have 25 neurons, hidden layer have 25 neurons, output layer only have one neuron. Here is how to reproduce the…
Bin
  • 3,645
  • 10
  • 33
  • 57
2
votes
1 answer

Cons of setting MaxNWts in R nnet to a very large number

I am using the nnet function package from the nnet package in R. I am trying to set the MaxNWts parameter and was wondering if there is any disadvantage to setting this number to a large value like 10^8 etc. The documentation says "The maximum…
user2912902
  • 327
  • 1
  • 7
  • 17
1
vote
0 answers

Running Neural network in R

I have a csv file for well-B2 that has five variables, I am trying to use simple neural network trial taking 2 variables "EC, CorrP" to predict the Grainsize, I followed some examples from training materials, but it does not work # Neural netwwork …
1
vote
2 answers

Extract weights from fitted regr.nnet object in mlr3

This question is related to the solution provided by @Sebastian for a previous question. It showed how to do repeated training for a regr.nnet learner using a custom (=fixed) resampling strategy and cloned…
tpetzoldt
  • 5,338
  • 2
  • 12
  • 29
1
vote
1 answer

Multiple runs and interaction terms in mlr3 regr.nnet task

I am trying to port a few didactical examples from packages nnet, neuralnet and ranger to package mlr3. I like the way how mlr3 can handle fitted models, e.g. model evaluation, feature importance or hyperparameter optimization, but have still a few…
tpetzoldt
  • 5,338
  • 2
  • 12
  • 29
1
vote
0 answers

How to hack stargazer ci.custom with a multinom model?

I'm trying to change my confidence intervals in stargazer() with ci.custom but it's not possible. Using this exemple (used here): library(dplyr) library(nnet) # create sample data data <- tibble( choice = rep(c("strawberry", "mango", "orange"),…
jrdavalos
  • 75
  • 4
1
vote
1 answer

Clustered standard errors, stars, and summary statistics in modelsummary for multinom models

I want to create a regression table with modelsummary (amazing package!!!) for multinomial logistic models run with nnet::multinom that includes clustered standard errors, as well as corresponding "significance" stars and summary…
1
vote
0 answers

How to correct standard errors standard errors in a multinomial logit using IV

I am trying to estimate a multinomial logit model using an instrumental variable. I didn't find any preexisting package, so I tried to estimate using a two-stage approach. First estimating the first stage as an OLS with the IV tsls1<-lm(d~x+z) Then…
1
vote
0 answers

Using emmeans with brms

I regularly use emmeans to calculate custom contrasts scross a wide range of statistical models. One of its strengths is its versatility: it is compatible with a huge range of packages. I have recently discovered that emmeans is compatible with the…
llewmills
  • 2,959
  • 3
  • 31
  • 58
1
vote
1 answer

How I include learners in mlr3

I am using rpart library in mlr3, but when I am changing it to other learners like nnet, it gives me error that not found in DictionaryLearner. In my code, only rpart is working and all other learners like nnet, svm gives error. I am using the…
Neha gupta
  • 43
  • 5
1
vote
1 answer

Implementing mlogit with non 'choice' (land cover) data

I am trying to implement a multinomial logistic regression using mlogit with landcover change data. However, because mlogit seems to be built around “choice” data and examples are limited to such data, I’m having a hard time determining the…
DoctorSpruce
  • 147
  • 1
  • 8