Unverified Commit 15916a95 authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[docs][python] fix shape description of returned result for predict_proba (#3933)

* Update dask.py

* Update sklearn.py
parent 18d57934
......@@ -630,7 +630,7 @@ class DaskLGBMClassifier(LGBMClassifier, _DaskLGBMModel):
fit.__doc__ = (
_base_doc[:_base_doc.find('callbacks :')]
+ '**kwargs\n'
+ ' ' * 12 + 'Other parameters passed through to ``LGBMClassifier.fit()``\n'
+ ' ' * 12 + 'Other parameters passed through to ``LGBMClassifier.fit()``.\n'
)
def predict(self, X: _DaskMatrixLike, **kwargs: Any) -> dask_Array:
......@@ -664,7 +664,7 @@ class DaskLGBMClassifier(LGBMClassifier, _DaskLGBMModel):
description="Return the predicted probability for each class for each sample.",
X_shape="Dask Array or Dask DataFrame of shape = [n_samples, n_features]",
output_name="predicted_probability",
predicted_result_shape="Dask Array of shape = [n_samples, n_classes]",
predicted_result_shape="Dask Array of shape = [n_samples] or shape = [n_samples, n_classes]",
X_leaves_shape="Dask Array of shape = [n_samples, n_trees] or shape = [n_samples, n_trees * n_classes]",
X_SHAP_values_shape="Dask Array of shape = [n_samples, n_features + 1] or shape = [n_samples, (n_features + 1) * n_classes]"
)
......@@ -781,7 +781,7 @@ class DaskLGBMRegressor(LGBMRegressor, _DaskLGBMModel):
fit.__doc__ = (
_base_doc[:_base_doc.find('callbacks :')]
+ '**kwargs\n'
+ ' ' * 12 + 'Other parameters passed through to ``LGBMRegressor.fit()``\n'
+ ' ' * 12 + 'Other parameters passed through to ``LGBMRegressor.fit()``.\n'
)
def predict(self, X: _DaskMatrixLike, **kwargs) -> dask_Array:
......@@ -922,7 +922,7 @@ class DaskLGBMRanker(LGBMRanker, _DaskLGBMModel):
fit.__doc__ = (
_base_doc[:_base_doc.find('callbacks :')]
+ '**kwargs\n'
+ ' ' * 12 + 'Other parameters passed through to ``LGBMRanker.fit()``\n'
+ ' ' * 12 + 'Other parameters passed through to ``LGBMRanker.fit()``.\n'
)
def predict(self, X: _DaskMatrixLike, **kwargs: Any) -> dask_Array:
......
......@@ -933,7 +933,7 @@ class LGBMClassifier(LGBMModel, _LGBMClassifierBase):
description="Return the predicted probability for each class for each sample.",
X_shape="array-like or sparse matrix of shape = [n_samples, n_features]",
output_name="predicted_probability",
predicted_result_shape="array-like of shape = [n_samples, n_classes]",
predicted_result_shape="array-like of shape = [n_samples] or shape = [n_samples, n_classes]",
X_leaves_shape="array-like of shape = [n_samples, n_trees] or shape = [n_samples, n_trees * n_classes]",
X_SHAP_values_shape="array-like of shape = [n_samples, n_features + 1] or shape = [n_samples, (n_features + 1) * n_classes] or list with n_classes length of such objects"
)
......
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