fit | AutoDataPrep in AutoML | teradataml - fit - Teradata Package for Python

Teradata® Package for Python User Guide

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Teradata Package for Python
Release Number
20.00
Published
March 2025
ft:locale
en-US
ft:lastEdition
2026-01-07
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
dita:id
rkb1531260709148
Product Category
Teradata Vantage

Use the fit() function to fit the data for auto data preparation.

Required Parameters

data
Specifies the input data to be used for auto data preparation.
target_column
Specifies the target column to be used for auto data preparation.

Example setup

  • Get the connection to the database to execute the function.
  • You must import the required functions mentioned in the example from teradataml
  • The function returns an error if not supported on the database you are connected to

Load the example data.

>>> load_example_data("teradataml", "titanic")

Create teradataml DataFrames.

>>> titanic = DataFrame.from_table("titanic")

Example 1: Run AutoDataPrep for classification problem

Titanic dataset is used to predict the survival of passengers.

Create an instance of AutoDataPrep.

>>> aprep_obj = AutoDataPrep(task_type="Classification", verbose=2)

Fit the data.

>>> aprep_obj.fit(titanic, titanic.survived)