f33a0c440d0291c7205f307c519d1f634e72fb80,dit/profiles/information_partitions.py,BaseInformationPartition,_partition,#BaseInformationPartition#,133

Before Change


            Is[node] = sum((-1)**(len(rv)+1)*Hs[rv] for rv in nx.dfs_preorder_nodes(self._lattice, node))

        // Mobius inversion of the above, resulting in the Shannon atoms.
        for node in nx.topological_sort(self._lattice)[:-1]:
            kids = islice(nx.dfs_preorder_nodes(rlattice, node), 1, None)
            atoms[node] = Is[node] - sum(atoms[child] for child in kids)

After Change


            Is[node] = sum((-1)**(len(rv)+1)*Hs[rv] for rv in nx.dfs_preorder_nodes(self._lattice, node))

        // Mobius inversion of the above, resulting in the Shannon atoms.
        for node in list(nx.topological_sort(self._lattice))[:-1]:
            kids = islice(nx.dfs_preorder_nodes(rlattice, node), 1, None)
            atoms[node] = Is[node] - sum(atoms[child] for child in kids)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 3

Instances


Project Name: dit/dit
Commit Name: f33a0c440d0291c7205f307c519d1f634e72fb80
Time: 2017-09-21
Author: ryangregoryjames@gmail.com
File Name: dit/profiles/information_partitions.py
Class Name: BaseInformationPartition
Method Name: _partition


Project Name: dit/dit
Commit Name: f33a0c440d0291c7205f307c519d1f634e72fb80
Time: 2017-09-21
Author: ryangregoryjames@gmail.com
File Name: dit/pid/pid.py
Class Name: BasePID
Method Name: _compute_mobius_inversion


Project Name: dit/dit
Commit Name: f33a0c440d0291c7205f307c519d1f634e72fb80
Time: 2017-09-21
Author: ryangregoryjames@gmail.com
File Name: dit/pid/pid.py
Class Name: BaseIncompletePID
Method Name: _compute_lattice_monotonicity


Project Name: pgmpy/pgmpy
Commit Name: 88212547e91a21fb28157edfd4cb3d2e73ee8351
Time: 2016-05-18
Author: erotemic@gmail.com
File Name: pgmpy/inference/Sampling.py
Class Name: BayesianModelSampling
Method Name: __init__


Project Name: pgmpy/pgmpy
Commit Name: d1ae141d2afb8dbfe8d8706ddf638873f71a8980
Time: 2020-01-06
Author: ankurankan@gmail.com
File Name: pgmpy/models/LinearGaussianBayesianNetwork.py
Class Name: LinearGaussianBayesianNetwork
Method Name: to_joint_gaussian