I was reading tidymodels and got confused about mlp() function's description from help section. it says from R help file,

mlp() defines a multilayer perceptron model (a.k.a. a single layer, feed-forward neural network). This function can fit classification and regression models.

I am confused how a multilayer perception model becomes a single layer, feed-forward neural network?

Could someone enlighten me here?


2 Answers 2


It's a model with a single hidden layer, plus the input and output layers, with all nodes connected from one layer to the next. That's the simplest case of multilayer perceptron (see eg Wikipedia).

For a long time there was a bit of tendency in statistics to consider only the single-hidden-layer case of neural networks, until deep convolutional networks such as AlexNet showed that more layers could really matter in practice. For example, even the second edition of Elements of Statistical Learning (from 2008), by definitely computation-friendly authors, restricts itself to a single hidden layer.


I agree that the explanation is confusing. The a.k.a. section refers to "perceptron model", not "multilayer perceptron model".

You can sense this from the tinymodel definition of MLP:

  mode = "unknown",
  engine = "nnet",
  hidden_units = NULL,
  penalty = NULL,
  dropout = NULL,
  epochs = NULL,
  activation = NULL,
  learn_rate = NULL

It's a complete model, not single layer because we do not talk about number of epochs, penalty (and usually learning rate) for a single layer of the neural network.

  • 1
    $\begingroup$ Thank you, guys! Your explanations clarify my confusion. It's indeed a single hidden layer neural network $\endgroup$ Commented Mar 4, 2023 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.