Icon

Feature Engineering with GenAI for Classification

<p><strong>Feature Engineering with GenAI for Classification</strong></p><p>This workflow uses GenAI to engineer features for <strong>supervised machine learning</strong>. The tasks is a binary classification problem to decide whether a bank should <strong>approve or reject a loan request</strong> advanced by an applicant. For comparison, the workflow displays two machine learning pipelines:</p><ol><li><p>ML pipeline to predict loan status</p></li><li><p>ML pipeline to predict loan status enriched with AI-engineered features</p></li></ol><p>Both pipelines use the <strong>XGBoost Tree Ensemble </strong>and its performance is optimized by selecting relevant features and tuning hyper-parameters.</p><p>In the "Supervision" component, the performance of the model with and without AI-engineered features is compared, AI-engineered features can be accepted (and saved), or rejected and technical support is requested per email.</p>

URL: KNIME for Generative AI https://hub.knime.com/c/D4ckx2q_J5FPBQXu
URL: Loan approval dataset https://www.kaggle.com/datasets/taweilo/loan-approval-classification-data/data

AI-Engineered Feature Creation

Data Cleaning, Normalization and Feature Selection

Model Training & Testing

Data Cleaning, Normalization and Feature Selection

1: Regular Machine Learning Pipeline

2: Machine Learning Pipeline with AI-Engineered Features

Business Expert Oversight

In this section, the result of the created features is monitored.

The comparison between the pipelines is presented as well as the description of the generated features.

At this point, it's possible to choose if the features want to be saved or not.

  • If the AI-generated features are deemed relevant, it's possible to save them in a database upon clicking on Commit.

  • If the features aren't deemed relevant, then an email to a Data Scientist is sent, in order to request help.

Model Training & Testing

Feature Engineering with GenAI for Classification

This workflow uses GenAI to engineer features for supervised machine learning. The tasks is a binary classification problem to decide whether a bank should approve or reject a loan request advanced by an applicant. For comparison, the workflow displays two machine learning pipelines:

  1. ML pipeline to predict loan status

  2. ML pipeline to predict loan status enriched with AI-engineered features

Both pipelines use the XGBoost Tree Ensamble and its performance is optimized by selecting relevant features and tuning hyper-parameters. In the "Supervision" component, the performance of the model with and without AI-generated features is compared, AI-generated features can be accepted (and saved), or rejected and technical support is requested per email.

Save Features

The selected features are saved in a database

Request Help

A Data Scientist intervention is requested

Data access

- Duplicate check- Encoding ofcategorical features
Data Cleaning
Compute features
Feature Creation
Capture Workflow Start
Global Feature Importance
Extract AI-generatedfeature name, descriptionand syntax
Parse responses
XGBoost Predictor
Handledin targetcolumn
Class Imbalance
Optimizing accuracy
Feature Selection
Top: train (70%)Bottom: test (30%)
Partitioning
- boostingRounds- maxDepth
HP Optimization
Accuracy:90.5% approx
Scorer
- boostingRounds- maxDepth
HP Optimization
Accuracy:91.2% approx
Scorer
Promptengineering
Expression
Z score
Normalizer
Normalizer (Apply)
Top: train (70%)Bottom: test (30%)
Partitioning
Feature Selection Filter
Feature Selection Filter
OpenAI Authenticator
- Remove features withmissing values - Duplicate check- Encoding ofcategorical features
Data Cleaning
Capture Workflow End
XGBoost Predictor
Normalizer (Apply)
OpenAI APIkey
Credentials Configuration
Model: Gpt-4o
OpenAI Chat Model Connector
Sorter
XGBoost Tree Ensemble Learner
Feature Selection Filter
Handledin targetcolumn
Class Imbalance
Supervision
Top: save featuresBottom: request tech help
CASE Switch Start
Documentation tocorrectly reference columns inthe Expression node
Table Creator
Loan approvaldataset 1 = approved; 0 = rejected
CSV Reader
Send email
LLM Prompter
XGBoost Tree Ensemble Learner
Feature Selection Filter
Z score
Normalizer
Write features to database
Optimizing accuracy
Feature Selection

Nodes

Extensions

Links