Fits a regression model using a Random Vector Functional Link (RVFL) network with dropout and regularization. The model includes both the original features and transformed features from a hidden layer.

rvfl2(
  x,
  y,
  nb_hidden = 50,
  sigma = 1,
  dropout = 0,
  seed = 42,
  lambda_1 = 0,
  lambda_2 = 0
)

Arguments

x

A numeric matrix of input features (training data).

y

A numeric vector of target values (training labels).

nb_hidden

An integer specifying the number of hidden units in the model. Default is 50.

sigma

A numeric value controlling the standard deviation of the initial random weights. Default is 1.

dropout

A numeric value between 0 and 1 representing the dropout rate. Default is 0.

seed

An integer seed for random number generation. Default is 42.

lambda_1

A numeric value controlling the L2 regularization on the input features. Default is 0.

lambda_2

A numeric value controlling the L2 regularization on the hidden layer features. Default is 0.

Value

A list of class rvfl2 containing the fitted model with the coefficients, hidden layer weights, and training parameters.