TD_PolynomialFeaturesFit Example | PolynomialFeaturesFit - Example: How to Use TD_PolynomialFeaturesFit - Analytics Database

Database Analytic Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-04-06
dita:mapPath
gjn1627595495337.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
jmh1512506877710
Product Category
Teradata Vantageā„¢

Every complete example in this document is available in a zip file that you can download. The zip file includes a SQL script file that creates the input tables for the examples. If you are reading this document on https://docs.teradata.com/, you can download the zip file from the attachment in the left sidebar.

TD_PolynomialFeaturesFit InputTable: polynomialFeaturesFit_input

 id col1 col2 col3 
 -- ---- ---- ---- 
  1    2    3    4
  2    5    6    7
  3    1    2    4
  4    5    3    5
  5    3    2    6

Example: TD_PolynomialFeaturesFit SQL Call

CREATE TABLE polynomialFit AS (
  SELECT * FROM TD_PolynomialFeaturesFit (
    ON polynomialFeaturesFit_input AS InputTable
    USING
    TargetColumns ('[1:2]')
    Degree (2)
  ) AS dt
) WITH DATA;

TD_PolynomialFeaturesFit Output

TD_INCLUDEBIAS_POLFIT:TRUE TD_INTERACTIONONLY_POLFIT:FALSE TD_DEGREE_POLFIT:2 col1 col2 
-------------------------- ------------------------------- ------------------ ---- ---- 
                1                               0                  2          NULL NULL