【机器学习】-Week3 3. Decision Boundary

来源:coursera 斯坦福 吴恩达 机器学习

【机器学习】-Week3 3. Decision Boundary_第1张图片



【机器学习】-Week3 3. Decision Boundary_第2张图片



【机器学习】-Week3 3. Decision Boundary_第3张图片


【机器学习】-Week3 3. Decision Boundary_第4张图片



【机器学习】-Week3 3. Decision Boundary_第5张图片



【机器学习】-Week3 3. Decision Boundary_第6张图片



【机器学习】-Week3 3. Decision Boundary_第7张图片


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:

【机器学习】-Week3 3. Decision Boundary_第8张图片

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.

你可能感兴趣的:(【机器学习】-Week3 3. Decision Boundary)