329f76b86a84c73f60da26c0234c57c3fc180da8,dit/algorithms/coinformation.py,,coinformation,#Any#Any#Any#Any#,10
Before Change
ditException
Raised if `dist` is not a joint distribution.
if dist.is_joint():
if rvs is None:
// Set to entropy of entire distribution
rvs = [ [i] for i in range(dist.outcome_length()) ]
rv_names = False
if crvs is None:
crvs = []
else:
msg = "The coinformation is applicable to joint distributions."
raise ditException(msg)
def entropy(rvs, dist=dist, crvs=crvs, rv_names=rv_names):
return H(dist, set().union(*rvs), crvs, rv_names)
I = sum( (-1)**(len(Xs)+1) * entropy(Xs) for Xs in powerset(rvs) )
After Change
ditException
Raised if `dist` is not a joint distribution.
rvs, crvs, rv_names = normalize_rvs(dist, rvs, crvs, rv_names)
def entropy(rvs, dist=dist, crvs=crvs, rv_names=rv_names):
return H(dist, set().union(*rvs), crvs, rv_names)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 26
Instances
Project Name: dit/dit
Commit Name: 329f76b86a84c73f60da26c0234c57c3fc180da8
Time: 2013-10-20
Author: ryangregoryjames@gmail.com
File Name: dit/algorithms/coinformation.py
Class Name:
Method Name: coinformation
Project Name: dit/dit
Commit Name: 329f76b86a84c73f60da26c0234c57c3fc180da8
Time: 2013-10-20
Author: ryangregoryjames@gmail.com
File Name: dit/algorithms/coinformation.py
Class Name:
Method Name: coinformation
Project Name: dit/dit
Commit Name: 329f76b86a84c73f60da26c0234c57c3fc180da8
Time: 2013-10-20
Author: ryangregoryjames@gmail.com
File Name: dit/algorithms/total_correlation.py
Class Name:
Method Name: total_correlation
Project Name: dit/dit
Commit Name: 329f76b86a84c73f60da26c0234c57c3fc180da8
Time: 2013-10-20
Author: ryangregoryjames@gmail.com
File Name: dit/algorithms/binding.py
Class Name:
Method Name: binding_information
Project Name: dit/dit
Commit Name: 329f76b86a84c73f60da26c0234c57c3fc180da8
Time: 2013-10-20
Author: ryangregoryjames@gmail.com
File Name: dit/algorithms/binding.py
Class Name:
Method Name: residual_entropy