pybambi.neuralnetworks package¶
Submodules¶
pybambi.neuralnetworks.base module¶
Base predictor class.
Author: Will Handley (wh260@cam.ac.uk) Date: November 2018
-
class
pybambi.neuralnetworks.base.
Predictor
(params, logL, split=0.8)[source]¶ Bases:
object
Base predictor class.
This takes in a training set params -> logL, and aims to construct a mapping between them.
Parameters: - params – numpy.array of physical parameters to train on shape (ntrain, ndims)
- logL – numpy.array of loglikelihoods to learn shape (ntrain,)
pybambi.neuralnetworks.kerasnet module¶
Keras neural net predictor.
This implements a Keras Sequential model (a deep MLP)
Author: Martin White (martin.white@adelaide.edu.au) Date: December 2018
-
class
pybambi.neuralnetworks.kerasnet.
KerasNetInterpolation
(params, logL, split=0.8, model=None)[source]¶ Bases:
pybambi.neuralnetworks.base.Predictor
Keras neural net interpolation.
Returns the loglikelihood from a Keras neural net-based interpolator
Trains a basic 3-layer neural network with 200 neurons per layer.
Parameters: - params – numpy.array of physical parameters to train on shape (ntrain, ndims)
- logL – numpy.array of loglikelihoods to learn shape (ntrain,)
pybambi.neuralnetworks.nearestneighbour module¶
Nearest neighbour interpolation predictor.
Author: Will Handley (wh260@cam.ac.uk) Date: November 2018
This implements a nearest neighbour interpolation, and is designed as a placeholder predictor, rather than an actual neural network
-
class
pybambi.neuralnetworks.nearestneighbour.
NearestNeighbourInterpolation
(params, logL, split=0.8)[source]¶ Bases:
pybambi.neuralnetworks.base.Predictor
Nearest Neighbour interpolation.
Returns the loglikelihood of the training point closest in parameter space
Parameters: - params – numpy.array of physical parameters to train on shape (ntrain, ndims)
- logL – numpy.array of loglikelihoods to learn shape (ntrain,)
Module contents¶
Collection of neural network interpolators.
Author: Will Handley (wh260@cam.ac.uk) Date: November 2018