简体   繁体   中英

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

我这个学期一直在学习机器学习算法,但我似乎无法理解一旦运行Gradient decent并且它们被更新后如何使用参数theta,特别是在Logistic回归中,简而言之,我的问题是如何在参数theta被更新。

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 (ie 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.

Typically, logistic regression is parametrized in a following way:

cl(x|theta) = 1 / (1 + exp(-SUM_{i=1}^d theta_i x_i + theta_0 )) ) > 0.5

which is equivalent to

cl(x|theta) = sign(SUM_{i=1}^d theta_i x_i + theta_0 )

so once you get your theta, you use it to make a prediction by computing a simple weighted sum of your data representation and you check the sign of such number.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM