sklearn.datasets.make_hastie_10_2?
sklearn.datasets.make_hastie_10_2(n_samples=12000, *, random_state=None)
生成Hastie等人使用的二進制分類數據。2009年,示例10.2。
十個特征是標準獨立的高斯,目標y定義為:
y[i] = 1 if np.sum(X[i] ** 2) > 9.34 else -1
在用戶指南中閱讀更多內容。
參數 | 說明 |
---|---|
n_samples | int, optional (default=12000) 樣本數。 |
random_state | int, RandomState instance, default=None 確定用于生成數據集的隨機數生成。 為多個函數調用傳遞可重復輸出的int值。 請參閱詞匯表。 |
返回值 | 說明 |
---|---|
X | array of shape [n_samples, 10] 輸入樣本。 |
y | array of shape [n_samples] 輸出值。 |
另見
該數據集方法的概括
參考
T. Hastie, R. Tibshirani and J. Friedman, “Elements of Statistical Learning Ed. 2”, Springer, 2009.