Algorithms Flashcards
1
Q
Perceptron
A
- algorithm
- weight update (1 - 0 ,0 - 1)
- graphical representation
- threshold function
2
Q
Sigmoid Function
A
- parametric, discriminative
- formula = 1/(1+e^(-z))
- 0 <= sigma(z) <= 1
3
Q
Hold out method
A
- split data into train test
- do this k times
4
Q
k fold cross validation
A
- n data points
- split into k folds(n/k)
- each with equal size
- each fold must be balanced
- use k-1 fold as train and 1 as test
- repeat k times
5
Q
leave one out method
A
- n data points
- n-1 points in train
- 1 as test
- repeat n times
6
Q
Performance Measure
A
Accuracy = (tp+tn) /(p+n) Precision (P) (+) = tp / pp (-) = tn / pn Recall (R) (+) = tp / p (-) = tn / n F measure = 2PR / (P+R) TPR = tp / p FPR = fp / n ROC AUC = h(a + b)/2
tp - true positive tn - true negative p - positive in dataset n - negative in dataset pp - predicted positive pn - predicted negative
7
Q
Probabilistic Classifier
A
NB, Logistic Regression, Sigmoid
8
Q
Discrete Classifier
A
Perceptron
9
Q
KNN
A
- classification, regression
- supervised learning
- non parametric
- no model at train phase
- closeness/ proximity
- algorithm
- lazy learner
- requires normalization
- instance based learning
- sensitive to noise and outliers
- larger k produces smooth boundaries
10
Q
NB
A
- generative model
- probabilistic classifier
- discrete -based on conditional probabilities
- continuous -pmf, pdf
- zero frequency problem
- smoothing (add one smoothing, Laplacian smoothing)
- bivariate and multivariate ND
- Mahalanobis distance
11
Q
Decision tree
A
- vertices are features