This smooth constructor implements single hidden layer neural networks.

## The neural network smooth constructor.
n(..., k = 10, type = 2)

## Initialize weights.
n.weights(nodes, k, r = NULL, s = NULL,
  type = c("sigmoid", "gauss", "softplus", "cos", "sin"),
  x = NULL, ...)

## Second weights initializer, internally calls n.weights.
make_weights(object, data, dropout = 0.2)

## Boosted neural net predictions.
predictn(object, newdata, model = NULL,
  mstop = NULL, type = c("link", "parameter"))

Arguments

...

For function n() a formula of the type ~x1+x2+x3 that specifies the covariates that should be modeled by the neural network. For function predictn(), arguments to be passed to predict.bamlss.

k

For function n(), the number of hidden nodes of the network. Note that one can set an argument split = TRUE to split up the neural network into, e.g., nsplit = 5 parts with k nodes each. For function n.weights(), argument k is the number of input variables of the network (number of covariates).

type

Integer. Type 1 fits a complete network in each boosting iteration, type = 2 selects the best fitting node in each boosting iteration. for function n.weights(), the type of activation function that should be used. For function predictn(), the type of prediction that should be computed.

nodes

Number of nodes for each layer, i.e., can also be a vector.

r, s

Parameters controlling the shape of the activation functions.

x

A scaled covariate matrix, the data will be used to identify the range of the weights.

object, data

See smooth.construct. For function predictn(), a boosted "bamlss" object.

dropout

The fraction of inner weights that should be set to zero.

newdata

The data frame that should be used for prediction.

model

For which parameter of the distribution predictions should be computed.

mstop

The stopping iteration for which predictions should be computed. The default is to return a matrix of predictions, each column represents the prediction of one boosting iteration.

Value

Function n(), similar to function s a simple smooth specification object.

Examples

## ... coming soon ...!