angel
angel copied to clipboard
How to get L1-norm of the Vector?
Hello,
Now I initialize a PSVector with 5 *10 (rows*dims) by stating
val den = PSVector.dense(10,5);
val local = den.pull(0);
local.norm() -- the output result shows that norm() is to calculate the L2-norm of the first row of the pulled vector local.
Could you please teach me how to implement calculating the L1-norm of a vector. Thanks a lot.