a2rl.utils.information_gain#

a2rl.utils.information_gain(Y, X)[source]#

Calculate the information gain of the input series given a conditioning series H(Y|X).

Parameters:
  • Y (ndarray) – tokenized input 1D array. The entropy is calculated on this series.

  • X (ndarray) – tokenized input 1D array. The conditioning array

Return type:

float

Returns:

The entropy minus a random baseline