Previous topic

Neural network models

Next topic

fynance.models.neural_network.BaseNeuralNet.set_optimizer

fynance.models.neural_network.BaseNeuralNet

class fynance.models.neural_network.BaseNeuralNet

Base object for neural network model with PyTorch.

Inherits of torch.nn.Module object with some higher level methods.

See also

MultiLayerPerceptron, RollingBasis
Attributes:
criterion : torch.nn.modules.loss.Loss

A loss function.

optimizer : torch.optim.Optimizer

An optimizer algorithm.

N, M : int

Respectively input and output dimension.

Methods

set_optimizer(criterion, optimizer[, params]) Set the optimizer object.
train_on(X, y) Trains the neural network model.
predict(X) Predicts outputs of neural network model.
set_data(X, y[, x_type, y_type]) Set data inputs and outputs.
save_model(path[, save_optimizer]) Save the model with this weights and parameters.
load_model(path[, load_optimizer]) Save the model with this weights and parameters.