"
]
},
{
- "cell_type": "code",
- "execution_count": null,
- "id": "bc6d449c-5f16-4a89-b047-f53a50127388",
+ "cell_type": "markdown",
+ "id": "98591f17-04ba-4324-af1b-b5ca2d4cc0b6",
+ "metadata": {
+ "tags": []
+ },
+ "source": [
+ "##### GITHUB REPO "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "a9f8dd8f-3fb3-4743-993b-24a4fa1e3a8a",
"metadata": {},
- "outputs": [],
- "source": []
+ "source": [
+ "
\n",
+ " Link:
https://github.com/rashadmin/Banking-System-and-Fraud-detection-Algorithm.git\n",
+ ""
+ ]
}
],
"metadata": {
diff --git a/Fraud_Detection.ipynb b/Fraud_Detection.ipynb
index ea2c06b..a0a116c 100644
--- a/Fraud_Detection.ipynb
+++ b/Fraud_Detection.ipynb
@@ -3,22 +3,64 @@
{
"cell_type": "markdown",
"id": "6dec910b-0599-45ce-8722-0e85df9fcac6",
+ "metadata": {
+ "tags": []
+ },
+ "source": [
+ "
BANKING SYSTEM WITH FRAUD DETECTION ALGORITHM
"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "352b99c3-d89c-4f13-9fec-99305b6d78ec",
+ "metadata": {
+ "tags": []
+ },
+ "source": [
+ "### Table Of Content\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "f7abb32e-fef0-40ff-9829-025de01006a0",
+ "metadata": {
+ "jp-MarkdownHeadingCollapsed": true,
+ "tags": []
+ },
+ "source": [
+ "* 1. A class that Initializes the personal Information of the Bank Account Owner"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "f7460b64-7f41-4f75-9718-802c9bd915d1",
"metadata": {},
"source": [
- "# BANKING SYSTEM WITH FRAUD DETECTION ALGORITHM"
+ "* 2. A class that has method for different Bank Transaction that can be performed on each Bank Account "
]
},
{
- "cell_type": "code",
- "execution_count": null,
- "id": "ba77fb99-68ba-40e0-a5bc-eb58a4fb946c",
+ "cell_type": "markdown",
+ "id": "5e74d108-8bef-427e-a383-6ef484cf0f90",
"metadata": {},
- "outputs": [],
- "source": []
+ "source": [
+ "* 3. A function that read into an already stored Bank Transaction and Check for Suspected Fradulent Activity"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "6262698e-3ba6-4890-a791-1a298bbef9e4",
+ "metadata": {
+ "jp-MarkdownHeadingCollapsed": true,
+ "tags": []
+ },
+ "source": [
+ "### - BANK ACCOUNT INITIALIZATION CLASS"
+ ]
},
{
"cell_type": "code",
- "execution_count": 18,
+ "execution_count": 1,
"id": "7bcb262b-9111-4044-ba9f-463bf55a8137",
"metadata": {},
"outputs": [],
@@ -97,9 +139,20 @@
" return (count,transaction)"
]
},
+ {
+ "cell_type": "markdown",
+ "id": "e4b66805-e2f8-46e5-8d35-00206ce9f6ef",
+ "metadata": {
+ "jp-MarkdownHeadingCollapsed": true,
+ "tags": []
+ },
+ "source": [
+ "### - BANK OPERATION CLASS"
+ ]
+ },
{
"cell_type": "code",
- "execution_count": 19,
+ "execution_count": 2,
"id": "bed2771e-5f20-4655-bf6c-774bc9e71cb4",
"metadata": {},
"outputs": [],
@@ -217,9 +270,20 @@
" "
]
},
+ {
+ "cell_type": "markdown",
+ "id": "941e825f-778e-4839-9ad5-f81229d7d595",
+ "metadata": {
+ "jp-MarkdownHeadingCollapsed": true,
+ "tags": []
+ },
+ "source": [
+ "### FRADULENT TRANSACTION CHECK FUNCTION"
+ ]
+ },
{
"cell_type": "code",
- "execution_count": 20,
+ "execution_count": 3,
"id": "146480c5-fefa-411c-9ce2-1b4a8233e857",
"metadata": {},
"outputs": [],
@@ -239,147 +303,64 @@
"\n",
"\n",
"\n",
- " return detail #print(type(items))"
+ " return detail "
]
},
{
- "cell_type": "code",
- "execution_count": 21,
- "id": "fab21de7-45d2-4ad7-91c7-c89bddc7169f",
- "metadata": {},
- "outputs": [],
+ "cell_type": "markdown",
+ "id": "aaae6dc2-b997-40ce-8824-99e7b86187dd",
+ "metadata": {
+ "jp-MarkdownHeadingCollapsed": true,
+ "tags": []
+ },
"source": [
- "b = Bank()"
+ "### CONTRIBUTORS"
]
},
{
- "cell_type": "code",
- "execution_count": null,
- "id": "4987f296-b7ae-4fb0-aee6-b1efff640700",
- "metadata": {},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " 1. Create an Account \n",
- " 2. Deposits \n",
- " 3. Withdrawals \n",
- " 4. Get balance\n",
- " 5. Exit \n",
- " 6. Fraud Check \n",
- "\n",
- "{}\n"
- ]
- },
- {
- "name": "stdin",
- "output_type": "stream",
- "text": [
- "Enter option: 1\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Create account!!\n"
- ]
- },
- {
- "name": "stdin",
- "output_type": "stream",
- "text": [
- "Enter First Name sedf\n",
- "Enter Last Name sdfg\n",
- "Enter Middle Name df\n",
- "Enter Age 24\n",
- "Enter Gender \n",
- "(M, F or Other): M\n",
- "Create a 4-digit PIN 2001\n",
- "Confirm PIN 2001\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "Welcome, Sedf. Your account number is 505871805.\n",
- " 1. Create an Account \n",
- " 2. Deposits \n",
- " 3. Withdrawals \n",
- " 4. Get balance\n",
- " 5. Exit \n",
- " 6. Fraud Check \n",
- "\n",
- "{'505871805': Sedf -Account Balance-- 0, Withdrawals - []}\n"
- ]
- },
- {
- "name": "stdin",
- "output_type": "stream",
- "text": [
- "Enter option: 2\n",
- "Enter your account number: 505871805\n",
- "Enter an amount: 20000\n"
- ]
- },
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- " 1. Create an Account \n",
- " 2. Deposits \n",
- " 3. Withdrawals \n",
- " 4. Get balance\n",
- " 5. Exit \n",
- " 6. Fraud Check \n",
- "\n",
- "{'505871805': Sedf -Account Balance-- 20000.0, Withdrawals - []}\n"
- ]
- },
- {
- "name": "stdin",
- "output_type": "stream",
- "text": [
- "Enter option: 3\n",
- "Enter your account number: 505871805\n"
- ]
- }
- ],
+ "cell_type": "markdown",
+ "id": "2b6514b5-b1f7-4713-b8fd-67e72e8c38a3",
+ "metadata": {
+ "jp-MarkdownHeadingCollapsed": true,
+ "tags": []
+ },
"source": [
- "b.bank_operations()"
+ "##### DATA STRUCTURE AND ALGORITHM GROUP 4"
]
},
{
- "cell_type": "code",
- "execution_count": 12,
- "id": "5eaeb772-b9cd-455f-a7e7-0566e61fcf92",
+ "cell_type": "markdown",
+ "id": "d6aaae9a-9eb2-4672-8b79-68da839998b5",
"metadata": {},
- "outputs": [
- {
- "ename": "TypeError",
- "evalue": "'float' object cannot be interpreted as an integer",
- "output_type": "error",
- "traceback": [
- "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
- "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)",
- "\u001b[0;32m/tmp/ipykernel_9776/1327007261.py\u001b[0m in \u001b[0;36m
\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mbucket\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m10.0\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0;36m1.0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
- "\u001b[0;31mTypeError\u001b[0m: 'float' object cannot be interpreted as an integer"
- ]
- }
- ],
"source": [
- "bucket = [0 for i in range(10.0+1.0)]"
+ " \n",
+ "
\n",
+ "
1. Ameen Abdulrasheed \n",
+ "
2. Adeola Odusami \n",
+ "
3. Ezike Nkemdili Jane\n",
+ "
4. Chisom Edoka\n",
+ "
"
]
},
{
- "cell_type": "code",
- "execution_count": null,
- "id": "bc6d449c-5f16-4a89-b047-f53a50127388",
+ "cell_type": "markdown",
+ "id": "98591f17-04ba-4324-af1b-b5ca2d4cc0b6",
+ "metadata": {
+ "tags": []
+ },
+ "source": [
+ "##### GITHUB REPO "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "a9f8dd8f-3fb3-4743-993b-24a4fa1e3a8a",
"metadata": {},
- "outputs": [],
- "source": []
+ "source": [
+ "
\n",
+ " Link:
https://github.com/rashadmin/Banking-System-and-Fraud-detection-Algorithm.git\n",
+ ""
+ ]
}
],
"metadata": {
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..62630df
--- /dev/null
+++ b/README.md
@@ -0,0 +1,16 @@
+# Banking-System-and-Fraud-detection-Algorithm
+
+## Problem
+Build a banking system that:
+i. Creates user accounts
+ii. Receives Deposits
+iii. Withdrawals
+iv. Fraudulent Detection
+
+## Project Descripton
+This project was part of the CSA Africa bootcamp requirement for the fulfilment of the successful completion of the workshop.. A group of 4 colloborated together to create this.
+We used the divide and conquer rule by dividing the problem into two; first part being creating bank classes. These bank classes were used to create bank user objects
+where we stored information like personal details then generated 10 digit random account number addded deposits and withdrawals as methods.
+The second part was creating a check_for_fraud function which uses the count sorting algorithm (was tweaked to our taste), the function sorts previous transactions in
+ascending order, then compare their median with the next transaction. If the next transaction is greater than the median of previous transactions then the bank owner
+gets an alert that this could be a possible fraudulent transaction and list out the transactions that were flagged.