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)