CoCalc Public Filesdit.ipynbOpen with one click!
Author: Harald Schilly
Views : 105
Compute Environment: Ubuntu 18.04 (Deprecated)

Dit -- discrete information theory

Kernel: Python 3 Ubuntu Linux

http://docs.dit.io/en/latest/

In [1]:
import dit dit.__version__
'1.2.3'
In [2]:
from dit.algorithms.distribution_optimizers import MaxEntOptimizer xor = dit.example_dists.Xor() meo = MaxEntOptimizer(xor, [[0,1], [0,2], [1,2]]) meo.optimize()
fun: -3.0000015140236025 jac: array([-2.9999997 , -3.0000003 , -2.99999964, -2.99999997, -3.00000015, -2.99999982, -3.00000024, -2.99999964]) message: 'Optimization terminated successfully.' nfev: 980 nit: 89 njev: 89 status: 0 success: True x: array([0.12500007, 0.12500007, 0.12500005, 0.12500005, 0.12500007, 0.12500007, 0.12500007, 0.12500007])
In [ ]:
In [ ]: