spkit.entropy_diff_cond_self

spkit.entropy_diff_cond_self(X, present_first=True)

Self-Conditional Entropy \(H_{\partial}(X_{i+1}|X_i)\)

Self-Conditional Entropy

Information of \(X(i+1)\) given \(X(i)\)

\[H_{\partial}(X_{i+1}|X_i) = H_{\partial}(X_{i+1}, X_i) - H_{\partial}(X_i)\]

using:: .. math:: H(X|Y) = H(X, Y) - H(Y)

Parameters:
X: 2d-array,
  • multi-dimentional signal space, where each column (axis=1) are the delayed signals

present_first: bool, default=True
  • if True, X[:,0] is present, and X[:,1:] is past, in incresing order

  • if True, X[:,-1] is present, and X[:,:-1] is past

Returns:
H_x1x: scaler
  • Self-Conditional Entropy

See also

entropy_diff_cond

Conditional Entropy

References

  • wikipedia -

Examples

>>> import numpy as np
>>> import spkit as sp
>>> x, fs = sp.data.optical_sample(sample=3)
>>> #x = sp.add_noise(x,snr_db=20)
>>> X = sp.signal_delayed_space(x,emb_dim=5,delay=2)
>>> H_x1x = sp.entropy_diff_cond_self(X, present_first=True)
>>> print('Self-Conditional Entropy')
>>> print(f'  H(X(i+1)|X(i)) = {H_x1x}')