Giter VIP home page Giter VIP logo

ai-on-z-fraud-detection's Introduction

Scope

This repository provides TensorFlow source code for building and training credit card fraud models using an LSTM and a GRU.

Summary

The models included in this repository are multi-layer LSTM or GRU models that analyze time series data to predict whether a credit card transaction is fraudulent.

The models consist of a recurrent neural network (RNN) with 2 layers of long short-term memory (LSTM) or gated recurrent unit (GRU), 200 units in each layer, followed by a dense layer. There is one output, which is Fraud/Non-fraud. A sequence of 7 transactions is used as the input to model.

In a transactional environment such as z/OS CICS, new data is generated from card terminal transactions. The transaction is received by a z/OS application that then must process it. As part of this processing, validation occurs. This can include the use of AI to provide insight on whether the transaction is potentially fraudulent.

The TensorFlow saved models were converted to the ONNX format using the tf2onnx 1.10.0 library and are also included in this repo. The models were converted using the following template:

import tf2onnx
spec = (tf.TensorSpec((7, 16, 220), tf.float32, name="input"),)
output_path = new_model.name + ".onnx"
onnx_model = tf2onnx.convert.from_keras(new_model, spec, output_path=output_path)

Environment:

  • s390x
  • Python 3.11.6
  • pandas==1.5.3
  • numpy==1.24.3
  • scikit-learn==1.2.2
  • sklearn-pandas==2.2.0
  • tensorflow==2.12.1
  • tf2onnx=1.16.1

The dataset used in this repo can be found here:

https://github.com/IBM/TabFormer/tree/main/data/credit_card

License

If you would like to see the detailed LICENSE click here.

ai-on-z-fraud-detection's People

Contributors

suona avatar aosadchyy avatar stevemar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.