How to Derive New Input Variables: Polynomial Feature Transform Flashcards
TYPICALLY WHAT DEGREES ARE USED FOR POLYNOMIAL FEATURE ENGINEERING? P322
A small degree, such as 2 or 3.
WHAT IS AN EXAMPLE OF CREATING A NEW VARIABLE THAT REPRESENTS THE INTERACTION BETWEEN FEATURES? P322
A new column that represents one variable multiplied by another.
WHAT DOES A SQUARED OR CUBED VERSION OF A VARIABLE WILL DO TO THE PROBABILITY DISTRIBUTION? P322
Separates the small and large values, this separation is increased with the size of the exponent.
THE SEPARATION OF SMALL AND LARGE VALUES CAUSED BY POLYNOMIAL FEATURES IS COMMON FOR CLASSIFICATION OR REGRESSION PROBLEMS? WHAT KIND OF PROBLEMS BENEFIT FROM THIS IN GENERAL? P322
Regression and generally tasks that have numerical input variables.
WHICH ALGORITHMS TYPICALLY RESPOND WELL TO POLYNOMIAL FEATURES? P322
Typically linear algorithms, such as linear regression and logistic regression, respond well to the use of polynomial input variables. It can be an effective way of allowing the model to identify nonlinear patterns.
WHAT IS POLYNOMIAL REGRESSION? P322
When polynomial feature engineering is used for linear regression algorithm, the method is more broadly referred to as polynomial regression.
WHAT IS THE NAME OF THE CLASS FOR CREATING POLYNOMIAL FEATURES IN SCIKIT-LEARN? P323
PolynomialFeatures
WHAT DO THE FEATURES CREATED BY POLYNOMIALFEATURES IN SCIKIT-LEARN INCLUDE? P323
ˆ The bias (the value of 1.0)
ˆ Values raised to a power for each degree (e.g. x 1 , x 2 , x 3 , …)
ˆ Interactions between all pairs of features (e.g. x1 × x2, x1 × x3, …)
WHAT DOES DEGREE PARAMETER IN POLYNOMIALFEATURES IN SCIKIT-LEARN MEAN? WHAT IS THE DEFAULT VALUE? P323
The degree argument controls the number of features created and defaults to 2.
WHAT DOES INTERACTION_ONLY PARAMETER IN POLYNOMIALFEATURES IN SCIKIT-LEARN MEAN? WHAT IS THE DEFAULT VALUE? P323
Interaction only argument means that only the raw values (degree 1) and the interaction (pairs of values multiplied with each other) are included, defaulting to False.
WHAT DOES INCLUDE_BIAS PARAMETER IN POLYNOMIALFEATURES IN SCIKIT-LEARN MEAN? WHAT IS THE DEFAULT VALUE? P323
The include_bias argument defaults to True to include the bias feature.
WHY SHOULD WE USE DEGREE OF 2 OR 3 POLYNOMIAL FEATURES FOR ANYTHING OTHER THAN VERY SMALL DATASETS? P328
To avoid a dramatic increase in input variables.