ABSTRACT

The popular term "artificial intelligence" often refers to neural network models, which are discussed in this chapter. After presentation of social science examples and discussion of the pros and cons of neural network approaches, a hands-on "Quick Start" example presents the use of neural networks to analyze NYC airline delays. In this example, the "nnet" neural networking package is used, with comparison to a linear regression model. In a second "Quick Start" example, nnet used on the classic example of classifying species of iris. The chapter then turns to analyzing Boston crime using a second popular neural network analysis package, "neuralnet", results from which are compared to ordinary least squares (OLS) regression. Related topics include visualizing the neuralnet model of Boston crime, determining variable importance, and comparing with other prediction packages using the "caret" package. In contrast to these neural network regression examples, "nnet" is used to model a marital status classification problem. A final section shows how Python tools may be used from within R using the "mlr3keras" package.