Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fraud detection demo #1224

Merged
merged 5 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
FlorianJacta marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
FlorianJacta marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
FlorianJacta marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
FlorianJacta marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
FlorianJacta marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
53 changes: 39 additions & 14 deletions docs/gallery/articles/fraud_detection/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ category: finance
data-keywords: dashboard vizelement layout chart ai multi-page classification enterprise
short-description: A Taipy Application that analyzes credit card transactions to detect fraud.
order: 20
img: fraud_detection/images/fraud_threshold.png
img: fraud_detection/images/Transactions.png
hide:
- toc
---
A Taipy Application that analyzes credit card transactions to detect fraud.

A Taipy Application that analyzes credit card transactions to detect fraud and how users can interact with each other in Taipy.
FlorianJacta marked this conversation as resolved.
Show resolved Hide resolved

!!! note "Taipy Enterprise edition"

Expand All @@ -17,25 +18,49 @@ A Taipy Application that analyzes credit card transactions to detect fraud.
application. If you’re looking for solutions that are immediately deployable and customizable to
your business needs, we invite you to try them out and contact us for more detailed information.

[Try it live](https://fraud-detection.taipy.cloud/Transactions){: .tp-btn target='blank' }
[Try it live](https://fraud-detection.taipy.cloud/Login){: .tp-btn target='blank' }
[Contact us](https://taipy.io/book-a-call){: .tp-btn .tp-btn--accent target='blank' }


# Understanding the Application

This application shows a list of credit card transactions. The user can select a date range to
predict fraud. The application will then use an XGB model to mark potentially fraudulent
transactions in red or yellow.
This application displays a list of credit card transactions. A model estimates whether a transaction
is fraudulent; this task can be automatically handled by a pipeline. However, some transactions may
require further human review.
FlorianJacta marked this conversation as resolved.
Show resolved Hide resolved

![Transactions](images/Transactions.png){width=90% : .tp-image-border }

Within tis page, you can access various analyses and visualizations of the data:
FlorianJacta marked this conversation as resolved.
Show resolved Hide resolved

- List of transactions
- Client information
- Fraud details

This demo includes user management and collaboration features. You need to select one of the
available users to access the application.

![Users](images/Users.png){width=90% : .tp-image-border }

After logging in, you can navigate to your user page to view the transactions assigned to you for
investigation. You can see both your past transactions and those requiring your attention. Clicking
on a transaction in the table will select it and navigate you to the Analysis page.
FlorianJacta marked this conversation as resolved.
Show resolved Hide resolved

This page also includes a newsfeed displaying notifications from the application or other users.
FlorianJacta marked this conversation as resolved.
Show resolved Hide resolved

![User Page](images/User.png){width=90% : .tp-image-border }

![List of Transactions Page](images/fraud_transactions.png){width=90% : .tp-image-border }
The Analysis page presents several pieces of information. The left section explains the model's
results (providing explanations on the model output), the middle section displays details about the
transaction, and the right section shows information about the client. Here, you can verify the
client's identity using a deep learning model.
FlorianJacta marked this conversation as resolved.
Show resolved Hide resolved

The user can select a transaction to see an explanation of the model's prediction, as well as the client's
other transactions.
You can decide whether the transaction is fraudulent or not. If you are unsure, you can share the
transaction with someone else for further review.

![Prediction Explanation Page](images/fraud_explanation.png){width=90% : .tp-image-border }
![Analysis](images/Analysis.png){width=90% : .tp-image-border }

The user can also choose the threshold of the model. The threshold is the model output
above which a transaction is considered fraudulent. The user can select the model according
to the displayed confusion matrix and by looking at False Positive and False Negative transactions.
For educational purposes, you can adjust the model's thresholdthe output value above which a
transaction is considered fraudulent. You can select the threshold by examining the displayed
confusion matrix and reviewing false positive and false negative transactions.

![Threshold Selection Page](images/fraud_threshold.png){width=90% : .tp-image-border }
![Threshold Selection Page](images/Threshold.png){width=90% : .tp-image-border }