rtemis

Command Palette

Search for a command to run...

MLPHyperparameters

Variant

Multilayer perceptron (torch). See `setup_MLP`.

Raw JSONv1Unknown properties rejected

Properties

hidden_units
integer[] | object | null≥ 1 items

Units in each hidden layer, one value per layer, so the length is the depth. NULL generates the widths from the shape settings.

shape
string | object | null

Profile of the generated hidden layer widths. Ignored when hidden_units is set.

one of"funnel""constant""triangle""long_funnel""diamond""hexagon""stairs"

shape_layers
integer | object | null≥ 1

Number of hidden layers to generate. Ignored when hidden_units is set.

shape_max_units
integer | object | null≥ 1

Widest generated hidden layer. NULL derives it from the encoded input width. Ignored when hidden_units is set.

activation
string | object

Activation applied after every hidden layer.

one of"relu""gelu""silu""elu""selu""leaky_relu""tanh"

norm
string | object | null

Normalization applied in every hidden layer. NULL applies none.

one of"batch_norm""layer_norm"

norm_first
boolean

Normalize before the activation rather than after it.

bias
boolean

Give every hidden layer and the output layer a bias term.

residual
boolean | object

Add a residual connection around every hidden layer, projected when the layer changes width.

dropout
number | object≥ 0< 1

Dropout probability applied after every hidden layer.

input_dropout
number | object≥ 0< 1

Dropout probability applied to the encoded input.

weight_decay
number | object≥ 0

L2 penalty, decoupled from the gradient under the adamw optimizer.

l1_penalty
number | object≥ 0

L1 penalty on the linear weights, added to the loss. Not interchangeable with weight_decay, which is L2.

embeddings
boolean

Represent each categorical feature by a learned embedding. FALSE one-hot encodes them instead.

embedding_dim
integer | object | null≥ 1

Width of every embedding. NULL sizes each from its feature's cardinality.

embedding_dropout
number | object≥ 0< 1

Dropout probability applied to the concatenated embeddings.

optimizer
string | object

Optimization algorithm.

one of"adamw""adam""sgd""rmsprop"

lr
number | object> 0

Learning rate.

beta1
number | null≥ 0< 1

Exponential decay rate of the first moment estimate. NULL leaves the torch default. Applies only when optimizer is adamw or adam.

beta2
number | null≥ 0< 1

Exponential decay rate of the second moment estimate. NULL leaves the torch default. Applies only when optimizer is adamw or adam.

eps
number | null> 0

Term added to the denominator for numerical stability. NULL leaves the torch default. Applies only when optimizer is adamw, adam or rmsprop.

momentum
number | null≥ 0

Momentum factor. NULL leaves the torch default. Applies only when optimizer is sgd or rmsprop.

lr_scheduler
string | null

Learning-rate schedule, configured from the epoch budget. NULL holds the learning rate fixed.

one of"step""cosine_annealing""one_cycle""reduce_on_plateau"null

batch_size
integer | object≥ 1

Cases per optimization step.

max_epochs
integer | object≥ 1

Largest number of passes over the training set.

patience
integer≥ 1

Epochs without validation improvement before stopping early. Requires validation data; without it the fit runs the full epoch budget.

max_grad_norm
number | object | null> 0

Clip the gradient norm to this value before each step. NULL does not clip.

loss
string | null

Training objective. NULL = set from outcome type.

one of"mse""l1""smooth_l1""cross_entropy"null

device
string | null

Compute device. On mps a seed does not reach dropout, so a fit using it is not reproducible; the run says so.

one of"cpu""cuda""mps"null

seed
integer | null

Random seed for weight initialization, dropout and batch shuffling. NULL leaves them drawn from the ambient RNG.

num_workers
integer≥ 0

Subprocesses used to load batches. 0 loads them in the main process.

drop_last
boolean

Drop the last incomplete batch of each training epoch.

ifw
boolean | object

Inverse Frequency Weighting in classification.

Relationships