0.0 Big O Flashcards
What is the model size for 0-R
Most frequent class O(1)
What is the model size for a general probabilistc learner
For m attributes with k possible values and C classes, this mean O(Ck^m) instances
What is the training complexity for a k-NN
O(1) (some people even say it is non-existent, but space complexity of training is O(Nd) since you need to store the data which also takes time).
N = number of training examples,
d = dimensionality
c = number of classes.
What is the training complexity for a Nonlinear non-approximate SVM
Nonlinear non-approximate SVM is O(N2) or O(N3) depending on the kernel.
You can get a O(N3) down to O(N2.3) with some tricks.
N = number of training examples,
d = dimensionality
c = number of classes.
What is the training complexity for a Naive Bayes
Naive Bayes is O(Nd), all it needs to do is computing the frequency of every feature value di for each class.
N = number of training examples,
d = dimensionality
c = number of classes.
What is the testing complexity for k-nn
k-NN is in O(Nd) since you have to compare the test point to every data point in your database.
N = number of training examples,
d = dimensionality
c = number of classes.
What is the testing complexity for Naive Bayes
O(cd) since you have to retrieve d feature values for each of the c classes.
N = number of training examples,
d = dimensionality
c = number of classes.
What is the training complexity for a Approximate SVM
O(NR) where R is number of iterations.
N = number of training examples,
d = dimensionality
c = number of classes.