a2rl.utils.is_markovian#

a2rl.utils.is_markovian(df, lag, mask=False)[source]#

Test for the Markov property in the data H(state|prev_state, prev_action) based on their conditional entropies.

Parameters:
  • df (WiDataFrame) – a discretized dataframe.

  • lag (int) – int for the lag.

Return type:

float

Returns:

Returns the conditional entropy of future stat given various lags. It is masked if the information gain is better than random