a94dbd2936fdc64e921333c04e0d66d491efc706,src/spn/algorithms/stats/Moments.py,,Moment,#,29
Before Change
assert len(feature_scope.intersection(evidence_scope)) == 0
marg_spn = marginalize(spn, keep=feature_scope | evidence_scope)
node_moments = _node_moment
node_moments.update({Sum: sum_moment,
Product: prod_moment})
After Change
for node in node_moment.keys():
try:
moment = node_moment[node]
node_ll = node_likelihoods[node]
except KeyError:
raise AssertionError("Node type {} doe not have associated moment and likelihoods".format(node))
node_moments[key] = leaf_moment(moment, node_ll)
if evidence is None:
// fake_evidence needs to be computed
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: SPFlow/SPFlow
Commit Name: a94dbd2936fdc64e921333c04e0d66d491efc706
Time: 2018-11-19
Author: claas@voelcker.net
File Name: src/spn/algorithms/stats/Moments.py
Class Name:
Method Name: Moment
Project Name: pgmpy/pgmpy
Commit Name: 7a7aba4fe48a3c6c90ba2432aab743fe5dfb7a3a
Time: 2014-11-03
Author: ankurankan@gmail.com
File Name: pgmpy/Inference/base.py
Class Name: Inference
Method Name: __init__
Project Name: pgmpy/pgmpy
Commit Name: ca25da7c55ba436ab557410d5f2e2e9b557d2840
Time: 2015-03-02
Author: abinash.panda.ece10@itbhu.ac.in
File Name: pgmpy/models/MarkovModel.py
Class Name: MarkovModel
Method Name: to_junction_tree