]
=
1
if
np
.
sum
(
X
[
i
]
**
2
)
>
9.34
else
-
1
- Parameters:
- n_samples : int, default=12000
The number of samples.
- random_state : int, RandomState instance or None, default=None
Determines random number generation for dataset creation. Pass an int
for reproducible output across multiple function calls.
See Glossary.
- Returns:
- X : ndarray of shape (n_samples, 10)
The input samples.
- y : ndarray of shape (n_samples,)
The output values.
References
Examples
from sklearn.datasets import make_hastie_10_2
X, y = make_hastie_10_2(n_samples=24000, random_state=42)
X.shape
(24000, 10)
y.shape
(24000,)
list(y[:5])
[np.float64(-1.0), np.float64(1.0), np.float64(-1.0), np.float64(1.0),
np.float64(-1.0)]