Our dataset includes categorical features such as gender, marital_status, and state_code. We will use the In-Database Analytic Function TD_OneHotEncodingFit to encode these categories into one-hot numeric vectors.
CREATE VIEW td_analytics_functions_demo.one_hot_encoding_joined_table_input AS (
SELECT * FROM TD_OneHotEncodingFit(
ON td_analytics_functions_demo.joined_table AS InputTable
USING
IsInputDense('true')
TargetColumn('gender', 'marital_status', 'state_code')
CategoryCounts(2, 4, 33)
Approach('Auto')
) AS dt
);