Miscellaneous API

Convenience functions for creating neural networks

multi_layer_feed_forward(input_length, output_length; width::Int = 5, depth::Int = 4, activation = softplus)

Create a Lux.jl chain for a multi layer feed forward network with the given input_length and output_length. The number of layers can be customised via the depth keyword argument, while the size of the hidden layers and the activation function are given by the width and activation keyword arguments.


Bounded Distributions

TransformedBeta(lb, ub, Beta)

A Beta distribution that is shifted and scaled to fit within a lower and an upper bound.

Keyword Arguments

  • lb : lower bound

  • ub : upper bound

  • Beta : $\text{Beta}(\alpha,\beta)$ distribution with shape parameters $\alpha$ and $\beta$ to be transformed. Defaults to Beta(2,2). The constructed TransformedBeta will have the shape of this Beta distribution within the (lb, ub) bounds.

    For instance if higher values, closer to the upper bound, are more likely for a parameter, Beta(5,2) can be used. Conversely, when lower values are more likely, a Beta(2,5) is a more appropriate prior. See the Distributions.jl documentation and the Wikipedia page referenced therein for more information.