0.0 Big O Flashcards

1
Q

What is the model size for 0-R

A

Most frequent class O(1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the model size for a general probabilistc learner

A

For m attributes with k possible values and C classes, this mean O(Ck^m) instances

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the training complexity for a k-NN

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the training complexity for a Nonlinear non-approximate SVM

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the training complexity for a Naive Bayes

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the testing complexity for k-nn

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the testing complexity for Naive Bayes

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the training complexity for a Approximate SVM

A

O(NR) where R is number of iterations.

N = number of training examples,

d = dimensionality

c = number of classes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly