73dcacffa7dee910a9478cd7d783d91ef84dc987,BayesianModel.py,BayesianModel,add_nodes,#BayesianModel#,10
Before Change
def add_nodes(self, *args):
Adds nodes to graph with node-labels as provided in function.
self._nodes_unsorted = [node_name for node_name in args]
self._nodes = sorted(self._nodes_unsorted, key=str.lower)
//using alphabetical order for all parameters internally
self.add_nodes_from({node:tuple()
for node in self._nodes})
After Change
def add_nodes(self, *args):
Adds nodes to graph with node-labels as provided in function.
for item in args:
if type(item) != type("str"):
raise TypeError("Name of nodes must be strings.")
self.add_nodes_from(args)
def add_edges(self, tail, head):
Takes two tuples of nodes as input. All nodes in "tail" are
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: pgmpy/pgmpy
Commit Name: 73dcacffa7dee910a9478cd7d783d91ef84dc987
Time: 2013-09-21
Author: snigam3112@gmail.com
File Name: BayesianModel.py
Class Name: BayesianModel
Method Name: add_nodes
Project Name: pytorch/text
Commit Name: 41bd713df7a4187dd0f42bbb9ffcac2ba126adbb
Time: 2020-06-16
Author: nayef.ahmed211@gmail.com
File Name: torchtext/experimental/vectors.py
Class Name: Vectors
Method Name: __init__
Project Name: dask/dask-ml
Commit Name: c98ec8fd10b3d5bcb889f939ef82df6aa8cd5518
Time: 2016-06-13
Author: crist042@umn.edu
File Name: dklearn/pipeline.py
Class Name: Pipeline
Method Name: from_sklearn