@@ -60,7 +60,7 @@ def bic_exact_search(X, super_graph=None, search_method='astar',
6060 dag_est : numpy.ndarray, shape=(d, d)
6161 Estimated DAG.
6262 search_stats : dict
63- Some statistics related to the seach procedure.
63+ Some statistics related to the search procedure.
6464 """
6565 n , d = X .shape
6666 if super_graph is None :
@@ -76,7 +76,7 @@ def bic_exact_search(X, super_graph=None, search_method='astar',
7676 if max_parents is None :
7777 max_parents = d
7878
79- # To store statistics related to the seach procedure
79+ # To store statistics related to the search procedure
8080 search_stats = {}
8181
8282 # Generate parent graphs (without parallel computing)
@@ -102,7 +102,7 @@ def bic_exact_search(X, super_graph=None, search_method='astar',
102102 if verbose :
103103 _logger .info ("Finished searching for shortest path." )
104104
105- # Covnert structures to adjacency matrix
105+ # Convert structures to adjacency matrix
106106 dag_est = np .zeros ((d , d ))
107107 for i , parents in enumerate (structures ):
108108 dag_est [parents , i ] = 1
@@ -135,14 +135,14 @@ def astar_shortest_path(parent_graphs, use_path_extension=True,
135135 structures : tuple, shape=(d,)
136136 Optimal parents for each variable.
137137 shortest_path_stats : dict
138- Some statistics related to the shortest path seach .
138+ Some statistics related to the shortest path search .
139139 """
140140 d = len (parent_graphs )
141141 opened = PriorityQueue ()
142142 closed = set ()
143143
144144 if use_k_cycle_heuristic :
145- # Create pattern databse
145+ # Create pattern database
146146 PD = create_dynamic_pd (parent_graphs , k )
147147 if verbose :
148148 _logger .info ('Finished creating pattern database.' )
@@ -234,7 +234,7 @@ def dp_shortest_path(parent_graphs, use_path_extension=True, verbose=False):
234234 structures : tuple, shape=(d,)
235235 Optimal parents for each variable.
236236 shortest_path_stats : dict
237- Some statistics related to the shortest path seach .
237+ Some statistics related to the shortest path search .
238238 """
239239 d = len (parent_graphs )
240240 order_graph = nx .DiGraph ()
@@ -320,7 +320,7 @@ def generate_parent_graph(X, i, max_parents=None, parent_set=None, include_paren
320320 parent_set = tuple (set (parent_set ))
321321
322322 if include_parents is None :
323- include_parents = () # Emptry tuple
323+ include_parents = () # Empty tuple
324324
325325 parent_graph = []
326326 for j in range (len (parent_set ) + 1 ):
0 commit comments