quantlab.model.predefined.mlp#

Qlib’s MLP benchmark model.

MLPNet reproduces Net of qlib/contrib/model/pytorch_nn.py, the network of Qlib’s DNNModelPytorch, and MLPRegressor trains it the way DNNModelPytorch does with its Alpha158 benchmark settings: random batches of rows drawn with replacement, a validation pass every eval_steps steps, ReduceLROnPlateau on the validation loss, and the best validation pass kept.

Classes

MLPNet

Qlib's Net: dropout, Linear + BatchNorm1d + LeakyReLU layers, dropout, Linear.

MLPRegressor

Qlib's MLP benchmark model (DNNModelPytorch) on rows.