Icon

4 Training_workflow

Training Workflow Fraud Detection

In this simple example a Random Forest model has been trained to detect potential Fraud Transactions.

To train the model it has been generated one year of data (current date to +1 year) following the "Reproducible Machine Learning for Credit Card Fraud Detection - Practical Handbook".

We opted to keep simple the model, for this reason we are arbitrary labeling as Fraud transactions the 99 percentile of trained dataset.

Then we have applied an artificially inflation to our future transactions to be sure that our model needs to retrain after a certain number of iterations.



Annotations and comments
  • Train a Random Forest model for fraud detection. Simple Fraud Detection case, aim here is see in action the Integrated Deployment KNIME nodes that are easily capturing the different parts of the workflow facilitating change the workflow a re-deploy to a production enviroment
  • 1) Capturing Input as a JSON
  • 3) Capturing Output as a JSON from Model Training output
  • Fraud Transaction Dataset Syntethic data for the Fraud Transaction table was created following this online resource: https://fraud-detection-handbook.github.io/fraud-detection-handbook/Chapter_3_GettingStarted/SimulatedDataset.html
  • 4) Combining the captured parts of the workflow
  • 2) Capturing Model Training
  • Input Capture Ends
  • Model Capture Ends
  • Output Capture Ends
  • Input Capture Starts
  • Model Capture Starts
  • Output Caputre Starts
  • JSON Input
  • Producing a JSON Output
  • Transactions info from DB
  • 70 % Training 30 % Testing
  • Class = Fraud
  • Generates and empty table to avoid duplicates when trigger re-training
  • Convert Table data from the model to JSON
  • Combining INPUT + MODEL + OUTPUT
  • Making callable the workflow

Nodes

Extensions

Links