Question
Please use Python to build an artificial neural network (ANN) model using attached dataset titled ( Bank_Predictions.csv ) to predict a list of bank accounts
Please use Python to build an artificial neural network (ANN) model using attached dataset titled (Bank_Predictions.csv) to predict a list of bank accounts (Acc_Closed - (ys)) at risk of closing (what account more likely to be closed or opened - hint: this is a binary classification problem) based-on several features (xs). Please ignore the first three features of the dataset that are (Number, Customer_ID, and Last_Name) because they don't have any impacts on the prediction. So, you could use the rest of features to predict the accounts that are more likely to be closed.
use a portion of the dataset Bank_Predictions which I have provided below (it is only 10 lines because the actual file has over 1000 lines so here is a small snippet);
Number | Customer_ID | Last_Name | Cr_Score | Location | Gender | Age | History | Current_Balance | Num_Of_Products | Has_CrCard | IsActiveMember | Customer_Salary | Acc_Closed |
1 | 15634602 | Hargrave | 619 | France | Female | 42 | 2 | 0 | 1 | 1 | 1 | 101348.9 | 1 |
2 | 15647311 | Hill | 608 | Spain | Female | 41 | 1 | 83807.86 | 1 | 0 | 1 | 112542.6 | 0 |
3 | 15619304 | Onio | 502 | France | Female | 42 | 8 | 159660.8 | 3 | 1 | 0 | 113931.6 | 1 |
4 | 15701354 | Boni | 699 | France | Female | 39 | 1 | 0 | 2 | 0 | 0 | 93826.63 | 0 |
5 | 15737888 | Mitchell | 850 | Spain | Female | 43 | 2 | 125510.8 | 1 | 1 | 1 | 79084.1 | 0 |
6 | 15574012 | Chu | 645 | Spain | Male | 44 | 8 | 113755.8 | 2 | 1 | 0 | 149756.7 | 1 |
7 | 15592531 | Bartlett | 822 | France | Male | 50 | 7 | 0 | 2 | 1 | 1 | 10062.8 | 0 |
8 | 15656148 | Obinna | 376 | Germany | Female | 29 | 4 | 115046.7 | 4 | 1 | 0 | 119346.9 | 1 |
9 | 15792365 | He | 501 | France | Male | 44 | 4 | 142051.1 | 2 | 0 | 1 | 74940.5 | 0 |
10 | 15592389 | Hanah | 684 | France | Male | 27 | 2 | 134603.9 | 1 | 1 | 1 | 71725.73 | 0 |
11 | 15767821 | Bearce | 528 | France | Male | 31 | 6 | 102016.7 | 2 | 0 | 0 | 80181.12 | 0 |
use this template as a guide to complete the task:
# Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd # Importing the dataset dataset = pd.read_csv('Bank_Predictions.csv') # ------ Part-1: Data preprocessing ---------- # Encoding categorical data # Splitting the dataset into the Training and Test sets # Feature Scaling # ------- Part-2: Build the ANN -------- # import keras library and packages # Initializing the ANN # Adding the input layer and the first hidden layer # Adding second hidden layer # Adding output layer # Compiling the ANN # Fitting the ANN to the training set # Predicting the Test set results # Making the confusion Matrix
Please include a screenshot with the answer.Thanks!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started