sklearn.datasets.make_friedman3

sklearn.datasets.make_friedman3(n_samples=100, *, noise=0.0, random_state=None)[source]

[源码]

生成“ Friedman#3”回归问题

该数据集在Friedman[1]和Breiman[2]中进行了描述。

输入X是在区间上均匀分布的4个独立特征:

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

根据以下公式创建输出y:

y(X) = arctan((X[:, 1] * X[:, 2] - 1 / (X[:, 1] * X[:, 3])) / X[:, 0]) + noise * N(01).

在用户指南中阅读更多内容。

参数 说明
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.