Merge pull request #268 from jseabold/docstrings

DOC: Add docstrings to user-facing classes.
This commit is contained in:
Tianqi Chen 2015-04-27 09:08:56 -07:00
commit 8ac89b290e

View File

@ -859,6 +859,10 @@ class XGBModel(XGBModelBase):
class XGBClassifier(XGBModel, XGBClassifier): class XGBClassifier(XGBModel, XGBClassifier):
__doc__ = """
Implementation of the scikit-learn API for XGBoost classification
""" + "\n".join(XGBModel.__doc__.split('\n')[2:])
def __init__(self, max_depth=3, learning_rate=0.1, n_estimators=100, silent=True, objective="binary:logistic", def __init__(self, max_depth=3, learning_rate=0.1, n_estimators=100, silent=True, objective="binary:logistic",
nthread=-1, gamma=0, min_child_weight=1, max_delta_step=0, subsample=1, colsample_bytree=1, nthread=-1, gamma=0, min_child_weight=1, max_delta_step=0, subsample=1, colsample_bytree=1,
base_score=0.5, seed=0): base_score=0.5, seed=0):
@ -910,4 +914,8 @@ class XGBClassifier(XGBModel, XGBClassifier):
class XGBRegressor(XGBModel, XGBRegressor): class XGBRegressor(XGBModel, XGBRegressor):
__doc__ = """
Implementation of the scikit-learn API for XGBoost regression
""" + "\n".join(XGBModel.__doc__.split('\n')[2:])
pass pass