Icon

Fraud_Detection_Isolation_Forest_Training

Fraud Detection: Train an isolation forest model using the KNIME H2O Machine Learning Integration

This workflow uses the KNIME H2O Machine Learning Integration to train an isolation forest model for fraud detection, a method particularly effective for anomaly detection, to spot potential fraud in transactional data. Starting with data intake and preprocessing, it segments the data into training and validation sets. We then use the H2O Isolation Forest Learner to train the model on the 2/3 of 'good' transaction patterns. The trained model is validated against the training set from the split, with its performance measured and the model saved for use in the deployment workflow.

Here are the steps taken to train the mode;
1. Read Training Data
2. Data Preprocessing: Partition data into a training, test, and validation set
3. Train/Validate the model and Evaluate results
4. Save model for deployment
5. Evaluate Results

URL: Kaggle Dataset https://www.kaggle.com/datasets/mlg-ulb/creditcardfraud

Annotations and comments
  • Fraud Detection: Train an isolation forest model using the KNIME H2O Machine Learning Integration This workflow uses the KNIME H2O Machine Learning Integration to train an isolation forest model for fraud detection, a method particularly effective for anomaly detection, to spot potential fraud in transactional data. Starting with data intake and preprocessing, it segments the data into training and validation sets. We then use the H2O Isolation Forest Learner to train the model on the 2/3 of 'good' transaction patterns. The trained model is validated against the training set from the split, with its performance measured and the model saved for use in the deployment workflow. Here are the steps taken to train the mode; 1. Read Training Data 2. Data Preprocessing: Partition data into a training, test, and validation set 3. Train/Validate the model and Evaluate results 4. Save model for deployment 5. Evaluate Results
  • Data Preprocessing Partition data into a training, test, and validation set
  • Read credit card data (sample) Download full dataset via the Kaggle link in the description
  • 1/3 of negatives and all positives for testing set
  • Top port: Keep only non fraudulent transactions (good) Lower port: Keep remaining transactions (fraudulent)
  • 2/3 of "goods" for training set
  • Transform Target column from 0/1 => good/bad
  • Create H2O Frame
  • Testing set
  • Apply Isolation Forest to get Mean Length
  • Create KNIME Table
  • Write IsolationForest.model
  • Classify Based on Mean Length
  • Open the view to see the scoring results

Nodes

Extensions

Links