sklearn.datasets.make_friedman2?

sklearn.datasets.make_friedman2(n_samples=100, *, noise=0.0, random_state=None)

[源碼]

生成“ Friedman#2”回歸問題

該數據集在Friedman[1]和Breiman[2]中進行了描述。

輸入X是在區間上均勻分布的4個獨立特征:

0 <= X[:, 0] <= 100,
40 * pi <= X[:, 1] <= 560 * pi,
0 <= X[:, 2] <= 1,
1 <= X[:, 3] <= 11.

在用戶指南中閱讀更多內容。

參數 說明
n_samples int, optional (default=100)
樣本數。
noise float, optional (default=0.0)
應用于輸出的高斯噪聲的標準偏差。
random_state int, RandomState instance, default=None
確定數據集噪聲的隨機數生成。為多個函數調用傳遞可重復輸出的int值。請參閱詞匯表.。
返回值 說明
X array of shape [n_samples, 4]
輸入樣本。
y array of shape [n_samples]
輸出值。

參考

  • 1 J. Friedman, “Multivariate adaptive regression splines”, The Annals of Statistics 19 (1), pages 1-67, 1991.

  • 2 L. Breiman, “Bagging predictors”, Machine Learning 24, pages 123-140, 1996.