Professional Documents
Culture Documents
Assignment 3
Geetanshu Kamboj (T00660998)
Logistic Regression
Similar to linear regression.
The dependent variable is categorical — 0 or 1, Yes or No, etc.
Predicts if something is true or false.
Sigmoid curve or S curve.
Threshold will be set to decide the category
Output = 0 or 1
Hypothesis => Z = WX + B
hO(x) = sigmoid(Z)
Example: logistic regression predicts whether a patient has stage 2 (0) or
stage 3 (1) cancer.
Ans 3:
Ans 4: K Nearest Neighbour is a simple algorithm that stores all the available cases and
classifies the new data or case based on a similarity measure. It is mostly used to
classifies a data point based on how its neighbours are classified.
K nearest neighbor algorithm check the k nearest neighbors and assign the label to the
current node whichever is most frequent among them.
Case 1 perform well as its accuracy is 96% where as case 2 accuracy is 95%.