Skip to content

Commit

Permalink
GH-16466 escape sequences (#16505)
Browse files Browse the repository at this point in the history
* GH-16466: Fixed invalid escape sequences in docstrings

Allow h2o to be imported without triggering syntax errors.

Closes #16466

* Adjust escape in the gen_xgboost.py

---------

Co-authored-by: Justin Mahlik <[email protected]>
  • Loading branch information
valenad1 and jmahlik authored Jan 29, 2025
1 parent 5c8f847 commit 39dc7c3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion h2o-bindings/bin/custom/python/gen_xgboost.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def convert_H2OXGBoostParams_2_XGBoostParams(self):
1. Train the H2OXGBoost model with H2OFrame trainFile and generate a prediction:
- h2oModelD = H2OXGBoostEstimator(\*\*h2oParamsD) # parameters specified as a dict()
- h2oModelD = H2OXGBoostEstimator(\\*\\*h2oParamsD) # parameters specified as a dict()
- h2oModelD.train(x=myX, y=y, training_frame=trainFile) # train with H2OFrame trainFile
- h2oPredict = h2oPredictD = h2oModelD.predict(trainFile)
Expand Down
2 changes: 1 addition & 1 deletion h2o-py/h2o/estimators/xgboost.py
Original file line number Diff line number Diff line change
Expand Up @@ -2568,7 +2568,7 @@ def convert_H2OXGBoostParams_2_XGBoostParams(self):
1. Train the H2OXGBoost model with H2OFrame trainFile and generate a prediction:
- h2oModelD = H2OXGBoostEstimator(\*\*h2oParamsD) # parameters specified as a dict()
- h2oModelD = H2OXGBoostEstimator(\\*\\*h2oParamsD) # parameters specified as a dict()
- h2oModelD.train(x=myX, y=y, training_frame=trainFile) # train with H2OFrame trainFile
- h2oPredict = h2oPredictD = h2oModelD.predict(trainFile)
Expand Down
2 changes: 1 addition & 1 deletion h2o-py/h2o/model/model_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ def r2(self, train=False, valid=False, xval=False):
Will return :math:`R^2` for GLM Models.
The :math:`R^2` value is defined to be :math:`1 - MSE / var`, where var is computed as :math:`\sigma * \sigma`.
The :math:`R^2` value is defined to be :math:`1 - MSE / var`, where var is computed as :math:`\\sigma * \\sigma`.
If all are ``False`` (default), then return the training metric value.
If more than one option is set to ``True``, then return a dictionary of metrics where the keys are "train",
Expand Down

0 comments on commit 39dc7c3

Please sign in to comment.