This code applies the Logistic Regression classification algorithm to the iris data set. The weights used for computing the activation function are optimized by minimizing the log-likelihood cost function using the gradient-descent method.
For more information about the logistic regression classifier and the log-likelihood cost function, see the following book: "Python Machine Learning" by Sebastian Raschka (Chapter 3).
This code is a modification of the Adaptive Linear Neuron (Adaline) code provided in the above-mentioned book.
Created on Jul 28, 2018
iris.data.csv: contains the iris dataset obtained from: https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data The dataset contains the following Attribute Information: sepal length in cm; sepal width in cm; petal length in cm; petal width in cm. Class labels: Iris Setosa, Iris Versicolour, Iris Virginica
LogisticRegressionG.ipynb: Jupiter notebook file containing the code.
LogisticRegressionG.py: corresponding python script.