Software for feed-forward neural networks with a single hidden layer, and for multinomial log-linear models.
Questions tagged [nnet]
167 questions
0
votes
0 answers
zero predictions from nnet function - R
I obtain 0 fitted values when using nnet function as below:
nnet(realized1~ann_t1+ann_t2+ann_t3, data=df2_input, size=2)
Output is
> str(nnet(realized1~ann_t1+ann_t2+ann_t3, data=df2_input, size=2))
# weights: 11
initial value 134.845214
final …

oercim
- 1,808
- 2
- 17
- 34
0
votes
0 answers
Replicate Stata's marginal effects from multinomial logit regression in R
I am trying to replicate Stata's marginal effects from multinomial logit models in R but with no success. For the multinomial logit model, I used the multinom() function from the nnet package and for the marginal effects I used the margins package…

cliu
- 933
- 6
- 13
0
votes
1 answer
Hyperparameter tuning for neural net (nnet) in caret in R
I am constructing a neural net model in R using caret package and my code is as follows:
model <- train(RS_LAI~S2REP_LF+PSRI_ES+IRECI+NDVIRE+B11_ES+B7+TCARI_LF+MCARI+WDRVI
, data = Data,
method = "nnet", trControl =…

Rajeev
- 27
- 5
0
votes
1 answer
Multinomial (nnet) does not work using parsnip and broom
I'm trying to run a multinomial (nnet) using tidymodel, but it shows me the next result:
Error: object of type 'closure' is not subsettable
data(iris)
ml<-multinom_reg() %>%
set_engine("nnet") %>%
set_mode("classification") %>%
…

Dante Sanchez
- 3
- 3
0
votes
1 answer
How can I pass one-hot encoded data to a nnet model to perform prediction?
I'm new to data science and want to build a neural network model in R. I've read about one-hot encoding categorical data prior to training. I've tried to implement this, however, I'm receiving the following error when trying to train the…

mrrain
- 134
- 1
- 12
0
votes
0 answers
Multinom model with ¿partial nesting?
Well, im trying to fit a model with 5 "classes"
Controls - DiseaseA_soft - DiseaseA_hard - DiseaseB_soft - DiseaseB_hard.
Being soft and hard 2 levels of their prognosis. "Hard" is way severe than "soft". Anyway, i don think a classical "Class ~."…

Galpaccru
- 57
- 12
0
votes
0 answers
Machine Learning Caret R: nnet showing NULL for varImp
I am running a neural net machine learning model in R using Caret's "nnet". I ran the train code with "importance= TRUE".
I need to show a list of the importances of the features that were included in the model. Not sure how to proceed. Any help is…

ClareFG
- 65
- 1
- 11
0
votes
1 answer
Error when plotting object of class tune in Jupyter Notebook but works in RStudio - how to fix it?
I tuned an nnet as follows :
tune1 <- tune.nnet(O3obs~., # formule
data=datappr, # choix des données
size=c(2,3,4), # choix entre les 3 sizes précisés
decay=c(1,2,3), # choix entre les 3…

cnemri
- 454
- 4
- 14
0
votes
1 answer
Use multinomial regression to create a scoring formula
I am trying to build a scoring model using a multinomial regression.
Some of this data is from a database, while the target value unconditional is from an assessment and has 3 potential modalities. I tried both multinomial and ordered logistic…

user3148607
- 191
- 11
0
votes
0 answers
cross validation in r with caret package
I have a dataset composed of 79 numerical variables used as predictors, and 20 numerical variables used as response variables, the total number of columns is 99. it has 140 observations of each variable(140 rows). is there a method to cross-validate…

Adham
- 31
- 7
0
votes
1 answer
What is an appropriate value of the parameter "Size" in nnet function in R?
I read somewhere that is should be which.is.max of the nnet model. Is there a rule of thumb to define the value for Size ?

Anshuma Chandak
- 3
- 2
0
votes
1 answer
R_function Nnet_How can I solve the following error "the object (list) can not be automatically converted in integer"?
I am trying to use a neural network algorithm to solve a statistical problem. When I call the function Nnet (software R) with the following parameters :
rn=nnet(resignation~., data=T[,-1], entropy=T, size=5, decay=1, MaxNWts=3000, maxit=1000)
I…

user9419032
- 13
- 3
0
votes
1 answer
Get caret's model-parameters for nnet
I am having trouble extracting caret's finalModel-parameters for nnet. If I use the - in my mind - exactly same parameters for caret::train and nnet::nnet, I get (sometimes) big differences. Have I forgotten a parameter or is this due to the…

r.user.05apr
- 5,356
- 3
- 22
- 39
0
votes
2 answers
Tuning size parameter for neural network
I want to fit a neural network model using caret package.There are 208 predictors all of which are important and cannot be discarded.
The maximum value that I can give to the size parameter is 4 beyond which I get an error saying that there are too…

Mohamad Sahil
- 165
- 2
- 12
0
votes
1 answer
nnet function with predict
I am trying to use nnet function alongside predict funtion to return some values, but my nnet$fitted.values are identical to my predict values and im not sure why, yes the 2 datasets are different
trainTest<- function(Train, Test)
{
nnetfit<-…

user484608
- 9
- 3