Member-only story

Classify Iris Species Using Python & Logistic Regression

randerson112358
4 min readJun 13, 2019

--

Logistic Regression Python Program

In this article I will show you how to write a simple logistic regression program to classify an iris species as either ( virginica, setosa, or versicolor) based off of the pedal length, pedal height, sepal length, and sepal height using a machine learning algorithm called Logistic Regression.

Logistic regression is a model that uses a logistic function to model a dependent variable. Like all regression analyses, the logistic regression is a predictive analysis. Logistic regression is used to describe data and to explain the relationship between one dependent variable and one or more nominal, ordinal, interval or ratio-level independent variables.

A Logistic Function Graph

If you prefer not to read this article and would like a video representation of it, you can check out the YouTube video below. It goes through everything in this article with a little more detail, and will help make it easy for you to start programming your own Machine Learning model in Python. Or you can use both (this article and video) as supplementary materials for learning about Machine Learning !

--

--

No responses yet