sliced.datasets.
make_polynomial
(n_samples=500, n_features=10, random_state=None)[source]¶Generates a dataset with a polynomial response curve that combines a quadratic and cubic response. There are two primary dimensions instead of one.
Inputs X are independent normally distributed features. The output y is created according to the formula:
beta1 = np.hstack((
[1, 1, 1], np.zeros(n_features - 3)))
beta2 = np.hstack((
[1, -1, -1], np.zeros(n_features - 3)))
u = np.dot(X, beta1)
v = np.dot(X, beta2)
y(u, v) = u + u ** 3 + v ** 2 + N(0, 1)
Out of the n_features features, only 3 are actually used to compute y. The remaining features are independent of y. As such the central subspace is two dimensional and consists of the u and v axes.
Parameters: |
|
---|---|
Returns: |
|