We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5de8ee6 commit 52bf6f9Copy full SHA for 52bf6f9
causallearn/search/PermutationBased/GRaSP.py
@@ -81,6 +81,7 @@ def grasp(
81
maxP: Optional[float] = None,
82
parameters: Optional[Dict[str, Any]] = None,
83
verbose: Optional[bool] = True,
84
+ node_names: Optional[List[str]] = None,
85
) -> GeneralGraph:
86
"""
87
Perform a greedy relaxation of the sparsest permutation (GRaSP) algorithm
@@ -185,7 +186,7 @@ def grasp(
185
186
raise Exception("Unknown function!")
187
score = localScoreClass
188
- node_names = [("x%d" % i) for i in range(p)]
189
+ node_names = [("X%d" % (i + 1)) for i in range(p)] if node_names is None else node_names
190
nodes = []
191
192
for name in node_names:
0 commit comments