tl_tune_nn: Tune a neural network model

View source: R/supervised-neural-networks.R

tl_tune_nnR Documentation

Tune a neural network model

Description

Tune a neural network model

Usage

tl_tune_nn(
  data,
  formula,
  is_classification = FALSE,
  sizes = c(1, 2, 5, 10),
  decays = c(0, 0.001, 0.01, 0.1),
  folds = 5,
  ...
)

Arguments

data

A data frame containing the training data

formula

A formula specifying the model

is_classification

Logical indicating if this is a classification problem

sizes

Vector of hidden layer sizes to try

decays

Vector of weight decay parameters to try

folds

Number of cross-validation folds (default: 5)

...

Additional arguments to pass to nnet()

Value

A list with the best model and tuning results


tidylearn documentation built on Feb. 6, 2026, 5:07 p.m.