binney.model package

Model Module

class BinomialModel[source]

Bases: anml.models.interface.Model

attach_specs(lr_specs)[source]
property design_matrix
detach_specs()[source]
forward(x, mat=None)[source]

Compute an output based on the generating mechanism defined by the model.

Parameters

x (np.ndarray) – input vector

Raises

NotImplementedError – not implemented in interface

gradient(x, data)[source]

Gradient of objective function computed using complex step method. Can be overwritten in inherited classes.

Parameters
  • x (np.ndarray) – inpute vector

  • data (Data) – a :class`~anml.data.data.Data` object.

Returns

gradient vector

Return type

np.ndarray

objective(x, data)[source]

Objective function for a model.

Parameters
  • x (np.ndarray) – input vector

  • data (Data) – a :class`~anml.data.data.Data` object

Raises

NotImplementedError – not implemented in this interface.

property parameter_set