positive
and negative
doesn’t mean good
or bad
instead poitive class
means the presence
and neagative class
means the absence
of something.malignant tumor
vs benign tumor
.change significantly
by adding new examples to dataset.Linear Regression
can work for classification, but often doesn’t work very well.Also known as logistic function.
The formula for a sigmoid function is as follows -
Sigmoid function
» a Non-linear component used to add Non-linearity in the output (z) of linear regression
and makes it a logistic regression
and capable of drawing non-linear decision boundry.Signmoid function
- Calculate z(x), i.e., f(x) for linear regression
- Calculate g(z) = sigmoid(z)
squared error cost
function isn’t suitable for logistic regression
?linear regression
the squared error cost
function generates a convex curve, i.e., a curve having same (single) local and global minimum.logistic regression
the squared error cost
function generates a Non-convex curve, i.e., a curve having multiple local minima, so we have to find multiple local minima to reach global minima.That’s why squared error cost
function not suitable for logistic regression. Thus, we used another loss function, given as:
Logistic Loss
function.logistic loss function
is well suited to gradient descent! It does not have plateaus, local minima, or discontinuities. Note, it is not necessary to always have a bowl shape
curve as in the case of squared error.Overfitting
High Varience means high variation in model fitting curve.
f(x)
has a High Order Ploynomial
equation.Underfitting
High Bias means model prediction is biased towards some class.
f(x)
has a Linear
equation.Generalization
. We want to generalize the model, i.e., model perform well even on examples not used in training.Just Right
generalized model.f(x)
J(w,b)
min J(w,b)