Icon

02_​Fraud_​Detection_​Table_​Input

Fraud Detection: Table Input

This workflow showcases how the Container Input (Table) and Container Output (Table) nodes can be used to create a REST API for a workflow that can then be deployed as inference workflow to KNIME Edge. The workflow can be called via REST and classifies multiple transactions as fraudulent or not fraudulent.

First, it applies some pre-processing by normalizing the data. Then, it reads in an already trained model and applies it to the input data. A custom prediction threshold is applied wit a Rule Engine node to get the final prediction (true for fraud, false for not fraud). Last, the output is post-processed and made ready for the response.

When deployed to KNIME Edge, a POST request with the following JSON body can be used for testing with two transactions:

{
"table-data": [
[
60808,
-1.65977253845451,
1.28590703928839,
-3.34963337176211,
2.05070755935895,
5.49
],
[
2,
-1.15823309349523,
0.877736754848451,
1.548717846511,
0.403033933955121,
69.99
]
]
}

The response will be:

{
"table-spec": [
{
"Prediction": "boolean"
}
],
"table-data": [
[
true
],
[
false
]
]
}






Prediction/Inferencing REST API REST Response REST API for Fraud DetectionThis workflow showcases how the Container Input (Table) and Container Output (Table)nodes can be used to create a REST API for a workflow that can then be deployed asinference workflow to KNIME Edge. The workflow can be called via REST and classifiesmultiple transactions as fraudulent or not fraudulent.See the workflow description for example requests and responses. Input transaction dataOutput predictionP(Class=1)>0.3 => trueP(Class=1)<=0.3 => falseRead RF Model ContainerInput (Table) ContainerOutput (Table) Random ForestPredictor Rule Engine Model Reader Preprocessing Postprocessing Prediction/Inferencing REST API REST Response REST API for Fraud DetectionThis workflow showcases how the Container Input (Table) and Container Output (Table)nodes can be used to create a REST API for a workflow that can then be deployed asinference workflow to KNIME Edge. The workflow can be called via REST and classifiesmultiple transactions as fraudulent or not fraudulent.See the workflow description for example requests and responses. Input transaction dataOutput predictionP(Class=1)>0.3 => trueP(Class=1)<=0.3 => falseRead RF Model ContainerInput (Table) ContainerOutput (Table) Random ForestPredictor Rule Engine Model Reader Preprocessing Postprocessing

Nodes

Extensions

Links