Multiclass Logistic Regression in Python
The chart below show 30 examples in three classes—red, green, and blue. Each class has two inputs and that range between 0 and 100.

The Python program below finds polynomial logistic models for the classes. It uses gradient descent to find coefficients for , , and (.)
Don’t forget to use pip install numpy
to install the numpy
library before
running this.
The above program should run in a few minutes and then print out values. For each of the classes, try entering its values below. When you’ve entered all the values, you will see what the model function for that class looks like.
$$\theta_0$$  
$$\theta_1$$  
$$\theta_2$$  
$$\theta_3$$  
$$\theta_4$$ 