Book Image

Mastering Predictive Analytics with R - Second Edition

By : James D. Miller, Rui Miguel Forte
Book Image

Mastering Predictive Analytics with R - Second Edition

By: James D. Miller, Rui Miguel Forte

Overview of this book

R offers a free and open source environment that is perfect for both learning and deploying predictive modeling solutions. With its constantly growing community and plethora of packages, R offers the functionality to deal with a truly vast array of problems. The book begins with a dedicated chapter on the language of models and the predictive modeling process. You will understand the learning curve and the process of tidying data. Each subsequent chapter tackles a particular type of model, such as neural networks, and focuses on the three important questions of how the model works, how to use R to train it, and how to measure and assess its performance using real-world datasets. How do you train models that can handle really large datasets? This book will also show you just that. Finally, you will tackle the really important topic of deep learning by implementing applications on word embedding and recurrent neural networks. By the end of this book, you will have explored and tested the most popular modeling techniques in use on real- world datasets and mastered a diverse range of techniques in predictive analytics using R.
Table of Contents (22 chapters)
Mastering Predictive Analytics with R Second Edition
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
8
Dimensionality Reduction
Index

The artificial neuron


Using our biological analogy, we can construct a model of a computational neuron, and this model is known as the McCulloch-Pitts model of a neuron:

Note

Warren McCulloch and Walter Pitts proposed this model of a neural network as a computing machine in a paper titled A logical calculus of the ideas immanent in nervous activity, published by the Bulletin of Mathematical Biophysics in 1943.

This computational neuron is the simplest example of a neural network. We can construct the output function, y, of our neural network directly from following our diagram:

The function g() in our neural network is the activation function. Here, the specific activation function that is chosen is the step function:

When the linear weighted sum of inputs exceeds zero, the step function outputs 1, and when it does not, the function outputs -1. It is customary to create a dummy input feature x0 which is always taken to be 1, in order to merge the bias or threshold w0 into the main sum as follows...