Machine Learning- Set 3
What does the find command do?
'find()' This command finds the positions in a matrix where a nonzero value is. For example: find(eye(3)); Displays: [1;5;9] because these positions, as we move horizontally across the rows and begin at the left side of the next row as we move vertically, are where 1's are in the 3x3 identity matrix.
What is a threshold Classifier?
A method used in classification problems to classify a threshold value at which an output is considered one of two outputs (or multiple in multiple classification problems).
What is Logistic Regression?
An algorithm with the properties (the output) is always between 0 and 1. This is a classification algorithm. Used when the labels "y" are discrete values.
Does the training set of a logistic regression problem determine the decision boundary?
No. The data set can allow us to select values for θ0, θ1,... etc. so that we can fit the hypothesis to correspond to the data set.
What is the probability that y= 0 in a classification problem?
P(y=0|x;θ)= 1 - P(y=1|x;θ) or P(y=0|x;θ) + P(y=1|x;θ) = 1 This is true because we know that y can either be 0 or 1; therefore the probabilities should sum to 1.
What is the sigmoid function?
The function used to describe the hypothesis of logistic regression. It has an asymptote at 0 and 1. g(z)=1/(1+e⁻z)
How can you interpret the hypothesis output?
The hypothesis output can be interpreted as the probability that the condition is 1 (or positive/100%). For example: suppose hθ(x)= 0.7. This may be interpreted as the patient having a 70% chance that their tumor is malignant for some x value (size) input.
How do you determine the decision boundary of a logistic regression hypothesis?
When θTx >= 0 is the probability that y= 1. When θTx= 0, this equation is the decision boundary.
What is the form of the hypothesis for logistic regression?
hθ(x)= g(θTx). Where g(z)- 1/(1+e⁻z) hθ(x)= 1/(1+e⁻θTx)
Interpret hθ(x)= p(y=1|x;θ)
hθ(x)= p(y=1|x;θ) The hypothesis is the probability that y=1 given that x (some feature, perhaps the size of the patient's tumor) is parameterized by θ.
Suppose hθ(x)= g(θ₀+θ₁x₁+ θ₂x₂+θ₃x₁²+θ₄x₂²) and θ= [-1;0;0;1;1]. What is the decision boundary?
x₁²+x₂²=1 The values outside this circle represent y=1. The values within the circle represent y= 0.