We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dedfb28 commit fd0d0ddCopy full SHA for fd0d0dd
chefboost/training/Training.py
@@ -511,12 +511,12 @@ def buildDecisionTree(
511
512
if df.Decision.dtypes == "object": # classification
513
pivot = pd.DataFrame(subdataset.Decision.value_counts()).reset_index()
514
-
+
515
if pd.__version__.split(".")[0] == "1":
516
pivot = pivot.rename(columns={"Decision": "Instances", "index": "Decision"})
517
- else: # if pd.__version__.split(".")[0] == "2":
+ else: # if pd.__version__.split(".")[0] == "2":
518
pivot = pivot.rename(columns={"Decision": "Instances", "count": "Decision"})
519
520
pivot = pivot.sort_values(by=["Instances"], ascending=False).reset_index()
521
522
else_decision = f"return '{pivot.iloc[0].Decision}'"
0 commit comments