Search code examples
algorithmmachine-learningartificial-intelligencelogistic-regressiongradient-descent

How is the decision boundary piloted after the parameters theta are updated


I have been learning about Machine learning algorithms this semester but I cant seem to understand how the parameters theta are used once Gradient decent is ran and they are updated, specifically in Logistic regression, In short my question is how is the decision boundary piloted after the parameters theta are updated.


Solution

  • After you use gradient descent to estimate your parameters theta, you can use those calculated parameters to make predictions.

    For any input x, you can now calculate an predicted outcome y.

    Ultimately the goal of machine learning is to make predictions.

    So you take a whole bunch of observations x and y. Where x is your input and y is your output. In case of logistic regression, y is one of two values. For example, take a bunch of emails (x) that are labeled spam or no spam (y is 1 for spam and 0 for no spam). Or take a bunch of medical images that are labeled healthy or non healthy. ...

    Feed all that data in your machine learning algorithm. Your algorithm (gradient descent for example), will calculate the theta coefficients.

    Now you can use these theta coefficient to make predictions for new values of x. For example a new email that the system has never seen, using the theta coefficient, you can predict whether it is spam or not.

    As far a plotting the decision boundary. This is probably feasible when you have two dimensions for x. You can have one dimension on each axis. And the resulting dots in your graph would be your y values. You could color them differently or show a different shape whether the result is one way or the other (i.e. your y is 0 or 1).

    In practicality, these plots are useful during a lecture to get a general gist of what you're trying to do or accomplish. In reality, every input X would probably be a vector of many values (way more than 2). And thus it becomes impossible to plot a decision boundary.