TD_PolynomialFeaturesFit Example | PolynomialFeaturesFit - Example: How to Use TD_PolynomialFeaturesFit - Teradata VantageCloud Lake

Lake - Analyze Your Data with ClearScape Analytics™

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2026-02-20
dita:mapPath
tcl1683670667798.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
tcl1683670667798

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 (SQLE-Analytic-Functions-Examples_xxxx) from the attachment in the left pane.

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