The chart below show 30 examples in three classes—red, green, and blue. Each class has two inputs \(x_1\) and \(x_2\) that range between 0 and 100.

The Julia program below finds polynomial logistic models for the classes. It uses gradient descent to find \(\theta_0^{(i)}, \theta_1^{(i)}, ... \theta_4^{(i)}\) for \(i = {1, 2, 3}\).

The above program should run in under a minute and then print out \(\theta\) values. For each of the classes, try entering its \(\theta\) 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$$