climb.tool.impl.data_suite.third_party.uq360.models.bayesian_neural_networks.bnn_models package

Submodules

climb.tool.impl.data_suite.third_party.uq360.models.bayesian_neural_networks.bnn_models.bayesian_mlp module

class climb.tool.impl.data_suite.third_party.uq360.models.bayesian_neural_networks.bnn_models.bayesian_mlp.BayesianClassificationNet(layer=<class 'climb.tool.impl.data_suite.third_party.uq360.models.bayesian_neural_networks.layers.BayesianLinearLayer'>, ip_dim=1, op_dim=1, num_nodes=50, activation_type='relu', num_layers=1)[source]

Bases: BayesianNN, ABC

Bayesian neural net with Categorical(y_true | f(x, w)) likelihoods. Use for classification.

likelihood(x=None, y=None)[source]
neg_elbo(num_batches, x=None, y=None)[source]
class climb.tool.impl.data_suite.third_party.uq360.models.bayesian_neural_networks.bnn_models.bayesian_mlp.BayesianNN(layer=<class 'climb.tool.impl.data_suite.third_party.uq360.models.bayesian_neural_networks.layers.BayesianLinearLayer'>, ip_dim=1, op_dim=1, num_nodes=50, activation_type='relu', num_layers=1)[source]

Bases: Module, ABC

Bayesian neural network with zero mean Gaussian priors over weights.

forward(x, do_sample=True)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

get_weights()[source]
kl_divergence_w()[source]
prior_predictive_samples(n_sample=100)[source]
set_weights(weight_dict)[source]
class climb.tool.impl.data_suite.third_party.uq360.models.bayesian_neural_networks.bnn_models.bayesian_mlp.BayesianRegressionNet(layer=<class 'climb.tool.impl.data_suite.third_party.uq360.models.bayesian_neural_networks.layers.BayesianLinearLayer'>, ip_dim=1, op_dim=1, num_nodes=50, activation_type='relu', num_layers=1)[source]

Bases: BayesianNN, ABC

Bayesian neural net with N(y_true | f(x, w), lambda^-1); lambda ~ Gamma(a, b) likelihoods.

get_noise_var()[source]
likelihood(x=None, y=None)[source]
mse(x, y)[source]

scaled rmse (scaled by 1 / std_y**2)

neg_elbo(num_batches, x=None, y=None)[source]

climb.tool.impl.data_suite.third_party.uq360.models.bayesian_neural_networks.bnn_models.horseshoe_mlp module

class climb.tool.impl.data_suite.third_party.uq360.models.bayesian_neural_networks.bnn_models.horseshoe_mlp.HshoeBNN(ip_dim=1, op_dim=1, num_nodes=50, activation_type='relu', num_layers=1, hshoe_scale=0.1, use_reg_hshoe=False)[source]

Bases: Module, ABC

Bayesian neural network with Horseshoe layers.

fixed_point_updates()[source]
forward(x, do_sample=True)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

get_weights()[source]
kl_divergence_w()[source]
prior_predictive_samples(n_sample=100)[source]
set_weights(weight_dict)[source]
class climb.tool.impl.data_suite.third_party.uq360.models.bayesian_neural_networks.bnn_models.horseshoe_mlp.HshoeClassificationNet(ip_dim=1, op_dim=1, num_nodes=50, activation_type='relu', num_layers=1, hshoe_scale=1e-05, use_reg_hshoe=False)[source]

Bases: HshoeBNN, ABC

Horseshoe net with Categorical(y_true | f(x, w)) likelihoods. Use for classification.

likelihood(x=None, y=None)[source]
neg_elbo(num_batches, x=None, y=None)[source]
class climb.tool.impl.data_suite.third_party.uq360.models.bayesian_neural_networks.bnn_models.horseshoe_mlp.HshoeRegressionNet(ip_dim=1, op_dim=1, num_nodes=50, activation_type='relu', num_layers=1, hshoe_scale=1e-05, use_reg_hshoe=False)[source]

Bases: HshoeBNN, ABC

Horseshoe net with N(y_true | f(x, w), lambda^-1); lambda ~ Gamma(a, b) likelihoods.

get_noise_var()[source]
likelihood(x=None, y=None)[source]
mse(x, y)[source]

scaled rmse (scaled by 1 / std_y**2)

neg_elbo(num_batches, x=None, y=None)[source]

Module contents