Decision Boundary
In order to get our discrete 0 or 1 classification, we can translate the output of the hypothesis function as follows:
The way our logistic function g behaves is that when its input is greater than or equal to zero, its output is greater than or equal to 0.5:
Remember.
So if our input to g is
, then that means:
From these statements we can now say:
The decision boundary is the line that separates the area where y = 0 and where y = 1. It is created by our hypothesis function.
Example:
In this case, our decision boundary is a straight vertical line placed on the graph where x_1 = =5, and everything to the left of that denotes y = 1, while everything to the right denotes y = 0.
Again, the input to the sigmoid function g(z)
doesn't need to be linear, and could be a function that describes a circle
or any shape to fit our data.
来源:coursera 斯坦福 吴恩达 机器学习
网友评论