pymor.algorithms.ml.nn.regressor¶
Module Contents¶
- class pymor.algorithms.ml.nn.regressor.NeuralNetworkRegressor(neural_network=FullyConnectedNN([30, 30, 30]), validation_ratio=0.1, tol=None, **kwargs)[source]¶
Bases:
pymor.core.base.BasicObjectScikit-learn-style regressor using neural networks from PyTorch.
- Parameters:
neural_network – Neural network to use in the regressor. The neural network should implement a function
set_input_output_dimensionsthat allows to change the input and the output dimension also after initialization.validation_ratio – Ratio of training data to use for validation during training.
tol – Prescribed tolerance for the neural network training. If
None, the neural network with the smallest validation loss is used (usually, multiple restarts of the training using different initial guesses for the weights and biases are performed).kwargs – Additional training parameters passed to the training algorithm. For training,
multiple_restarts_trainingis used. The default training parameters will be overriden by the additional training parameters provided here.
Methods
Fit neural network using PyTorch optimization algorithms.
Predict the target for the input
X.