pyhgf.math.binary_surprise_finite_precision#

pyhgf.math.binary_surprise_finite_precision(value, expected_mean, expected_precision, eta0=0.0, eta1=1.0)[source]#

Compute the binary surprise with finite precision.

Parameters:
  • value (Array | ndarray | bool | number | bool | int | float | complex) – The observed value.

  • expected_mean (Array | ndarray | bool | number | bool | int | float | complex) – The expected probability of observing category 1.

  • expected_precision (Array | ndarray | bool | number | bool | int | float | complex) – The precision of the underlying normal distributions.

  • eta0 (Array | ndarray | bool | number | bool | int | float | complex) – The first possible value.

  • eta1 (Array | ndarray | bool | number | bool | int | float | complex) – The second possible value.

Returns:

The binary surprise under finite precision.

Return type:

surprise