initialise_estimator {NeuralEstimators} | R Documentation |
Initialise a neural estimator
Description
Helper function for initialising a neural estimator.
The estimator is couched in the DeepSets framework so that it can be applied to data with an arbitrary number of independent replicates (including the special case of a single replicate).
Usage
initialise_estimator(
p,
architecture,
d = 1,
estimator_type = "point",
depth = 3,
width = 32,
activation = "relu",
activation_output = "identity",
variance_stabiliser = NULL,
kernel_size = NULL,
weight_by_distance = TRUE,
probs = c(0.025, 0.975)
)
Arguments
p |
number of unknown parameters in the statistical model |
architecture |
a string: for unstructured data, one may use a fully-connected MLP ("MLP"); for data collected over a grid, a convolutional neural network ("CNN"); and for graphical or irregular spatial data, a graphical neural network ("GNN"). |
d |
for unstructured multivariate data (i.e., when |
estimator_type |
the type of estimator; either "point" or "interval". |
depth |
the number of hidden layers. Either a single integer or an integer vector of length two specifying the depth of inner (summary) and outer (inference) network of the DeepSets framework. Since there is an input and an output layer, the total number of layers is |
width |
a single integer or an integer vector of length |
activation |
the (non-linear) activation function of each hidden layer. Accepts a string of Julia code (default |
activation_output |
the activation function of the output layer layer. Accepts a string of Julia code (default |
variance_stabiliser |
a function that will be applied directly to the input, usually to stabilise the variance.: a string ('log' for the natural logarithm, or 'cbrt' for the cube-root function), or a string of Julia code that will be converted to a Julia function using |
kernel_size |
(applicable only to CNNs) a list of length |
weight_by_distance |
(applicable only to GNNs) flag indicating whether the estimator will weight by spatial distance; if true (default), a |
probs |
(applicable only if |
Value
the initialised neural estimator, a JuliaProxy object
Examples
## Not run:
library("NeuralEstimators")
p = 2
initialise_estimator(p, architecture = "MLP")
initialise_estimator(p, architecture = "GNN")
## 1D convolution
initialise_estimator(p, architecture = "CNN", kernel_size = list(10, 5, 3))
## 2D convolution
initialise_estimator(p, architecture = "CNN",
kernel_size = list(c(10, 10), c(5, 5), c(3, 3)))
## End(Not run)