inferlo.Factor

class inferlo.Factor[source]

Abstract factor - function of one or more random variables.

__init__(model: GraphModel, var_idx: List[int])[source]
Parameters:
  • model – Graphical model this factor belongs to.

  • var_idx – Indices of variables in the model, on which this factor depends.

Methods

__init__(model, var_idx)

clone(new_model)

Creates the same factor, but pointing to new model.

get_name()

Name of this factor.

is_discrete()

Whether all variables in the factor are discrete.

value(values)

Value of function inside this factor in given point.

clone(new_model: GraphModel)[source]

Creates the same factor, but pointing to new model.

get_name()[source]

Name of this factor.

is_discrete()[source]

Whether all variables in the factor are discrete.

abstractmethod value(values: List[float])[source]

Value of function inside this factor in given point.