DEVELOPMENT... OpenML
Flow
sklearn.preprocessing.data.PolynomialFeatures

sklearn.preprocessing.data.PolynomialFeatures

Visibility: public Uploaded 13-08-2021 by Cameron Burke sklearn==0.18.1 numpy>=1.6.1 scipy>=0.9 0 runs
0 likes downloaded by 0 people 0 issues 0 downvotes , 0 total downloads
  • openml-python python scikit-learn sklearn sklearn_0.18.1
Issue #Downvotes for this reason By


Loading wiki
Help us complete this description Edit
Generate polynomial and interaction features. Generate a new feature matrix consisting of all polynomial combinations of the features with degree less than or equal to the specified degree. For example, if an input sample is two dimensional and of the form [a, b], the degree-2 polynomial features are [1, a, b, a^2, ab, b^2].

Parameters

degreeThe degree of the polynomial features. Default = 2default: 2
include_biasIf True (default), then include a bias column, the feature in which all polynomial powers are zero (i.e. a column of ones - acts as an intercept term in a linear model) Examples -------- >>> X = np.arange(6).reshape(3, 2) >>> X array([[0, 1], [2, 3], [4, 5]]) >>> poly = PolynomialFeatures(2) >>> poly.fit_transform(X) array([[ 1., 0., 1., 0., 0., 1.], [ 1., 2., 3., 4., 6., 9.], [ 1., 4., 5., 16., 20., 25.]]) >>> poly = PolynomialFeatures(interaction_only=True) >>> poly.fit_transform(X) array([[ 1., 0., 1., 0.], [ 1., 2., 3., 6.], [ 1., 4., 5., 20.]])default: true
interaction_onlyIf true, only interaction features are produced: features that are products of at most ``degree`` *distinct* input features (so not ``x[1] ** 2``, ``x[0] * x[2] ** 3``, etc.)default: false

0
Runs

List all runs
Parameter:
Rendering chart
Rendering table

A PHP Error was encountered

Severity: Core Warning

Message: Module 'mysqli' already loaded

Filename: Unknown

Line Number: 0

Backtrace: