Skip to content

Commit

Permalink
review-suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunyogeshwaran committed Mar 19, 2024
1 parent f1341d7 commit 9e203e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions h2o-bindings/bin/custom/python/gen_dt.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
>>> train, test = prostate.split_frame(ratios=[0.7])
>>> sdt_h2o = H2ODecisionTreeEstimator(model_id="decision_tree.hex",
... max_depth=5,
... categorical_encoding="auto")
... categorical_encoding="binary")
>>> sdt_h2o.train(y=target_variable, training_frame=train)
>>> pred_test = sdt_h2o.predict(test)
""",
Expand All @@ -28,6 +28,7 @@
>>> prostate = h2o.import_file("http://s3.amazonaws.com/h2o-public-test-data/smalldata/prostate/prostate.csv")
>>> target_variable = 'CAPSULE'
>>> prostate[target_variable] = prostate[target_variable].asfactor()
>>> prostate["const_1"] = 6
>>> train, test = prostate.split_frame(ratios=[0.7])
>>> sdt_h2o = H2ODecisionTreeEstimator(model_id="decision_tree.hex",
... max_depth=5,
Expand All @@ -44,8 +45,7 @@
>>> prostate[target_variable] = prostate[target_variable].asfactor()
>>> train, test = prostate.split_frame(ratios=[0.7])
>>> sdt_h2o = H2ODecisionTreeEstimator(model_id="decision_tree.hex",
... max_depth=5,
... max_depth=20)
... max_depth=5)
>>> sdt_h2o.train(y=target_variable, training_frame=train)
>>> pred_test = sdt_h2o.predict(test)
""",
Expand All @@ -59,7 +59,7 @@
>>> train, test = prostate.split_frame(ratios=[0.7])
>>> sdt_h2o = H2ODecisionTreeEstimator(model_id="decision_tree.hex",
... max_depth=5,
... min_rows=10)
... min_rows=20)
>>> sdt_h2o.train(y=target_variable, training_frame=train)
>>> pred_test = sdt_h2o.predict(test)
"""
Expand Down

0 comments on commit 9e203e1

Please sign in to comment.