Professional Documents
Culture Documents
CS2810 - Lecture 5
CS2810 - Lecture 5
By Professor Wu
A special query function
In a sentence, we would
say that the norm of a
vector x is …..
End
1
If you are a bird, the distance If you are a pedestrian, the In this case, L-infinity norm
you travel would be the L1 norm is more accurate makes more sense. You just
Euclidean norm/L2 norm. pick the largest value.
Example:
The Lp norm is the most used family of norms.
Depending on the value of p, you get a different norm.
If p = 1, we get L1
If p = 2, we get L2
If p = infinity
The norm that is not a norm ||x|| 0 / cardinality
We have only seen the most common norms, but how Example:
do we tell if a function is a norm?
1. Triangle inequality :
2. Scaling:
3. Positive Definite:
Double Check:
True
True
True
Triangle
Quick Review
>>> v = np.array([[4],[3]])
1,2,3
0,0,1
3,8,4
1,1,1
You can read this file into a variable X with the following code