Skip to content

DOC add docstring example for sklearn.datasets.make_gaussian_quantiles #28230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion sklearn/datasets/_samples_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1933,7 +1933,7 @@ def make_gaussian_quantiles(

Parameters
----------
mean : ndarray of shape (n_features,), default=None
mean : array-like of shape (n_features,), default=None
The mean of the multi-dimensional normal distribution.
If None then use the origin (0, 0, ...).

Expand Down Expand Up @@ -1973,6 +1973,17 @@ def make_gaussian_quantiles(
References
----------
.. [1] J. Zhu, H. Zou, S. Rosset, T. Hastie, "Multi-class AdaBoost", 2009.

Examples
--------
>>> from sklearn.datasets import make_gaussian_quantiles
>>> X, y = make_gaussian_quantiles(random_state=42)
>>> X.shape
(100, 2)
>>> y.shape
(100,)
>>> list(y[:5])
[2, 0, 1, 0, 2]
"""
if n_samples < n_classes:
raise ValueError("n_samples must be at least n_classes")
Expand Down