Logistic Regression Flashcards
What is logistic regression used for?
Prediction and classification models
Binary Classification
Embedding a data point with label y E {0, 1} into a feature space f(x) E R^n. Determining in data point is positive or negative.
Linear Binary Classification
Line specifies separation between positive and negative labels. Goal is to learn weight ‘w’ from data (wTf(x) > 0)
BOW Features
Bag-of-words feature representation. Predefined vector where each index represents a different feature and its presence with a 0 or 1
BOW and Classification
Can use BOW features for classification of a corpus.
Weight Function
w = (w1, …, wn)T
- w is weight
- set to vector of scalars
Data Point Function
x = (x1, …, xn)T (n features)
- x is data point
- set to vector of features
Probability of Calculating Positive Weight Function
P(y = +|x) = logistic(wTx)
How do you learn weight ‘w’?
Maximize log likelihood on data