"...git@developer.sourcefind.cn:tianlh/lightgbm-dcu.git" did not exist on "465d1262eb1d8eb3cfa7cc505140c035e52c8118"
Unverified Commit fa2de89b authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[docs][scikit-learn] removed duplicated docstrings (#3164)

* Revert "[ci][docs] temporarily pin Sphinx version (#3157)"

This reverts commit b3a84df5.

* removed duplicated docstrings
parent b6ec7458
sphinx == 3.0.2 sphinx
sphinx_rtd_theme >= 0.3 sphinx_rtd_theme >= 0.3
mock; python_version < '3' mock; python_version < '3'
sphinx == 3.0.2 sphinx >= 3.0.2
sphinx_rtd_theme >= 0.3 sphinx_rtd_theme >= 0.3
mock; python_version < '3' mock; python_version < '3'
breathe breathe
...@@ -255,28 +255,8 @@ class LGBMModel(_LGBMModelBase): ...@@ -255,28 +255,8 @@ class LGBMModel(_LGBMModelBase):
Attributes Attributes
---------- ----------
n_features_ : int
The number of features of fitted model.
n_features_in_ : int n_features_in_ : int
The number of features of fitted model. The number of features of fitted model.
classes_ : array of shape = [n_classes]
The class label array (only for classification problem).
n_classes_ : int
The number of classes (only for classification problem).
best_score_ : dict or None
The best score of fitted model.
best_iteration_ : int or None
The best iteration of fitted model if ``early_stopping_rounds`` has been specified.
objective_ : string or callable
The concrete objective used while fitting this model.
booster_ : Booster
The underlying Booster of this model.
evals_result_ : dict or None
The evaluation results if ``early_stopping_rounds`` has been specified.
feature_importances_ : array of shape = [n_features]
The feature importances (the higher, the more important the feature).
feature_name_ : array of shape = [n_features]
The names of features.
Note Note
---- ----
...@@ -690,49 +670,49 @@ class LGBMModel(_LGBMModelBase): ...@@ -690,49 +670,49 @@ class LGBMModel(_LGBMModelBase):
@property @property
def n_features_(self): def n_features_(self):
"""Get the number of features of fitted model.""" """:obj:`int`: The number of features of fitted model."""
if self._n_features is None: if self._n_features is None:
raise LGBMNotFittedError('No n_features found. Need to call fit beforehand.') raise LGBMNotFittedError('No n_features found. Need to call fit beforehand.')
return self._n_features return self._n_features
@property @property
def best_score_(self): def best_score_(self):
"""Get the best score of fitted model.""" """:obj:`dict` or :obj:`None`: The best score of fitted model."""
if self._n_features is None: if self._n_features is None:
raise LGBMNotFittedError('No best_score found. Need to call fit beforehand.') raise LGBMNotFittedError('No best_score found. Need to call fit beforehand.')
return self._best_score return self._best_score
@property @property
def best_iteration_(self): def best_iteration_(self):
"""Get the best iteration of fitted model.""" """:obj:`int` or :obj:`None`: The best iteration of fitted model if ``early_stopping_rounds`` has been specified."""
if self._n_features is None: if self._n_features is None:
raise LGBMNotFittedError('No best_iteration found. Need to call fit with early_stopping_rounds beforehand.') raise LGBMNotFittedError('No best_iteration found. Need to call fit with early_stopping_rounds beforehand.')
return self._best_iteration return self._best_iteration
@property @property
def objective_(self): def objective_(self):
"""Get the concrete objective used while fitting this model.""" """:obj:`string` or :obj:`callable`: The concrete objective used while fitting this model."""
if self._n_features is None: if self._n_features is None:
raise LGBMNotFittedError('No objective found. Need to call fit beforehand.') raise LGBMNotFittedError('No objective found. Need to call fit beforehand.')
return self._objective return self._objective
@property @property
def booster_(self): def booster_(self):
"""Get the underlying lightgbm Booster of this model.""" """Booster: The underlying Booster of this model."""
if self._Booster is None: if self._Booster is None:
raise LGBMNotFittedError('No booster found. Need to call fit beforehand.') raise LGBMNotFittedError('No booster found. Need to call fit beforehand.')
return self._Booster return self._Booster
@property @property
def evals_result_(self): def evals_result_(self):
"""Get the evaluation results.""" """:obj:`dict` or :obj:`None`: The evaluation results if ``early_stopping_rounds`` has been specified."""
if self._n_features is None: if self._n_features is None:
raise LGBMNotFittedError('No results found. Need to call fit with eval_set beforehand.') raise LGBMNotFittedError('No results found. Need to call fit with eval_set beforehand.')
return self._evals_result return self._evals_result
@property @property
def feature_importances_(self): def feature_importances_(self):
"""Get feature importances. """:obj:`array` of shape = [n_features]: The feature importances (the higher, the more important).
.. note:: .. note::
...@@ -745,7 +725,7 @@ class LGBMModel(_LGBMModelBase): ...@@ -745,7 +725,7 @@ class LGBMModel(_LGBMModelBase):
@property @property
def feature_name_(self): def feature_name_(self):
"""Get feature name.""" """:obj:`array` of shape = [n_features]: The names of features."""
if self._n_features is None: if self._n_features is None:
raise LGBMNotFittedError('No feature_name found. Need to call fit beforehand.') raise LGBMNotFittedError('No feature_name found. Need to call fit beforehand.')
return self._Booster.feature_name() return self._Booster.feature_name()
...@@ -907,14 +887,14 @@ class LGBMClassifier(LGBMModel, _LGBMClassifierBase): ...@@ -907,14 +887,14 @@ class LGBMClassifier(LGBMModel, _LGBMClassifierBase):
@property @property
def classes_(self): def classes_(self):
"""Get the class label array.""" """:obj:`array` of shape = [n_classes]: The class label array."""
if self._classes is None: if self._classes is None:
raise LGBMNotFittedError('No classes found. Need to call fit beforehand.') raise LGBMNotFittedError('No classes found. Need to call fit beforehand.')
return self._classes return self._classes
@property @property
def n_classes_(self): def n_classes_(self):
"""Get the number of classes.""" """:obj:`int`: The number of classes."""
if self._n_classes is None: if self._n_classes is None:
raise LGBMNotFittedError('No classes found. Need to call fit beforehand.') raise LGBMNotFittedError('No classes found. Need to call fit beforehand.')
return self._n_classes return self._n_classes
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment