The perceptron function in R
In the previous sections, we understood the fundamental concepts underlying the use of a perceptron as a classifier. The time has come to put into practice what has been studied so far. We will do it by analyzing an example in which we will try to classify the floral species on the basis of the size of the petals and sepals of an Iris. As you will recall, the iris
dataset has already been used in Chapter 3, Deep Learning Using Multilayer Neural Networks. The reason for its re-use is not only due to the quality of the data contained in it that allows the reader to easily understand the concepts outlined, but also, and more importantly, to be able to compare the different algorithms.
As you will recall, the dataset contains 50 samples from each of three species of Iris (Iris setosa
, Iris virginica
, and Iris versicolor
). Four features were measured from each sample: the length and the width of the sepals and petals, in centimeters.
The following variables are contained...