fd408e8129f0fa94936e19115e7433b92a83e681,src/spn/io/Text.py,,to_str_equation,#Any#Any#Any#,54
Before Change
def to_str_equation(node, to_str_equation_lambdas, feature_names=None):
tnode = type(node)
if tnode in to_str_equation_lambdas:
return to_str_equation_lambdas[tnode](node, feature_names)
if isinstance(node, Leaf) and Leaf in to_str_equation_lambdas:
After Change
return leaf_to_str(node, feature_names)
if isinstance(node, Product):
children_strs = map(lambda child: to_str_equation(child, leaf_to_str, feature_names), node.children)
return "(" + " * ".join(children_strs) + ")"
if isinstance(node, Sum):
fmt_chld = lambda w, c: str(w) + "*(" + to_str_equation(c, leaf_to_str, feature_names) + ")"
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: SPFlow/SPFlow
Commit Name: fd408e8129f0fa94936e19115e7433b92a83e681
Time: 2018-03-27
Author: molina@cs.tu-darmstadt.de
File Name: src/spn/io/Text.py
Class Name:
Method Name: to_str_equation
Project Name: pantsbuild/pants
Commit Name: bfe927d5cf5c729a8d85037047660c5d5d4c1689
Time: 2018-02-01
Author: ndh@baroquebobcat.com
File Name: src/python/pants/engine/scheduler.py
Class Name: LocalScheduler
Method Name: products_request
Project Name: facebookresearch/ParlAI
Commit Name: 37f58cc580da8735ae5a259d4cb4ba0b8701e78e
Time: 2019-02-08
Author: roller@fb.com
File Name: tests/test_pytorch_data_teacher.py
Class Name: TestPytorchDataTeacher
Method Name: test_pyt_preprocess