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.



Train a Random Forest model for fraud detection.Simple Fraud Detection case, aim here is see in action the Integrated Deployment KNIME nodes that areeasily capturing the different parts of the workflow facilitating change the workflow a re-deploy to aproduction enviroment 2) Capturing Model Training Fraud Transaction DatasetSyntethic 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 1) Capturing Input as a JSON 3) Capturing Output as a JSON from Model Training output 4) Combining the captured parts of theworkflow 70 % Training30 % TestingClass = FraudInput Capture StartsInput Capture Ends Model Capture StartsModel Capture EndsOutput Caputre StartsOutput Capture EndsJSON InputProducing a JSON OutputCombiningINPUT + MODEL + OUTPUTMaking callablethe workflowConvert Table data fromthe model to JSONGenerates and empty tableto avoid duplicates when trigger re-trainingJSON input to tablefor the modelTransactions infofrom DB Database Connector Partitioning Random ForestLearner Random ForestPredictor CaptureWorkflow Start CaptureWorkflow End CaptureWorkflow Start CaptureWorkflow End CaptureWorkflow Start CaptureWorkflow End ContainerInput (JSON) ContainerOutput (JSON) Workflow Combiner WorkflowService Output Table to JSON Row Filter Threshold Generator JSON to Table AppendingPredictions in DB DB Query Reader Filter last 30 days Train a Random Forest model for fraud detection.Simple Fraud Detection case, aim here is see in action the Integrated Deployment KNIME nodes that areeasily capturing the different parts of the workflow facilitating change the workflow a re-deploy to aproduction enviroment 2) Capturing Model Training Fraud Transaction DatasetSyntethic 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 1) Capturing Input as a JSON 3) Capturing Output as a JSON from Model Training output 4) Combining the captured parts of theworkflow 70 % Training30 % TestingClass = FraudInput Capture StartsInput Capture Ends Model Capture StartsModel Capture EndsOutput Caputre StartsOutput Capture EndsJSON InputProducing a JSON OutputCombiningINPUT + MODEL + OUTPUTMaking callablethe workflowConvert Table data fromthe model to JSONGenerates and empty tableto avoid duplicates when trigger re-trainingJSON input to tablefor the modelTransactions infofrom DBDatabase Connector Partitioning Random ForestLearner Random ForestPredictor CaptureWorkflow Start CaptureWorkflow End CaptureWorkflow Start CaptureWorkflow End CaptureWorkflow Start CaptureWorkflow End ContainerInput (JSON) ContainerOutput (JSON) Workflow Combiner WorkflowService Output Table to JSON Row Filter Threshold Generator JSON to Table AppendingPredictions in DB DB Query Reader Filter last 30 days

Nodes

Extensions

Links