Artificial Neural Network-R Part 1


Artificial Neural Network- Till now we tried to understand, how ANN algorithm algorithm works. In next few sections we would try to build a ANN project in R, basically we would develop Churn Model in R.

In the first section of this series we would do data pre-processing i.e. we would make data ready for the implementation ANN algorithm.

Step 1: Set up a working library. Setting up a working library is always of great help. Once we decided on working library we need not change file referencing or while reading data set from a particular directory. “setwd” is the command used with path followed in quotes.


Step 2: Read the data set from working library. In this analysis we would use “Churn_Modelling” data set to understand the ANN logic. Use the following command to read the data.


Step 3:The provided data has 14 variables. We would start with identification of variables which would not have any impact on our target variable or in other words we would remove insignificant variables. Our data has three variables(RowNumber, CustomerID , Surname) which do not have any predictive power. So we would remove those variables from our data set.


Step 4: Our data has two(Geography and Gender) categorical variables and as per the requirements of package we would use while implementing the algorithm, we need to convert categorical variables into numeric. Below are the command to convert categorical variables into numeric.


Step 5: Splitting the data set into training and test data set. We would develop ANN on training data set and testing would be done on test data set.


Step 6: In the last step of data pre-processing we would do feature scaling of independent variables.




Please enter your comment!
Please enter your name here