Neural Networks, a better Human Nervous System?

This article gives an example of the uses of Neural Networks.

Purpose

The purpose of this article is to display a use of Neural Networks as a machine learning model while using the data from this website. Using Neural Networks, I will make predictions of whether the hotels in the observations have a tennis court on their facilities.

What’s Neural Networks?

The function of a neural network is to make predictions of what an observation will be. It takes an input data, and after many repetitions of mathematical algorithms, makes a prediction of what the output will be. It then compares those results with what actually occurs, then adjusts its process to become better. It somewhat resembles the Human Nervous System.

The Model

In the code chunk below, I split the data in a training and testing set, then make predictions.

set.seed(1)

#To split the training / testing data
trainIndex <- createDataPartition(LV_data$Tennis.court, p = .6, list = FALSE, times = 1)

LV_dataTrain <- LV_data[ trainIndex,]
LV_dataTest  <- LV_data[-trainIndex,]

#Train the model

LV_dataNNET<- train(
  form = as.factor(Tennis.court) ~ Pool+Gym+Hotel.stars+Casino+Free.internet+Review.month+Score+Traveler.type+Nr..rooms,
  data = LV_dataTrain,
  trControl = trainControl(method = "cv", number = 10,
                           classProbs =  TRUE),
  method = "nnet",
  preProcess = c("center", "scale"),
  tuneLength = 5,
  trace=FALSE)

LV_dataNNET_Pred<-predict(LV_dataNNET,LV_dataTest,type="prob")

LV_dataNNETtestpred<-cbind(LV_dataNNET_Pred,LV_dataTest)

LV_dataNNETtestpred<-LV_dataNNETtestpred%>%
  mutate(prediction=if_else(NO>YES,"NO","YES"))

Results

The table below displays what the model predicted vs. what actual occurred.

How can Neural Networks be used in Accounting?

Neural Networks can have many different uses. In the case of forensic accounting, it can be used to detect fraudulent transactions, which essentially enhances the efficiently and effectiveness of forensic investigations. This will help to decrease the risk of incorrect acceptance during those investigations and make accountants with this skillset more valuable.