angel icon indicating copy to clipboard operation
angel copied to clipboard

How to get L1-norm of the Vector?

Open JessicaAlphy opened this issue 6 years ago • 0 comments

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.

JessicaAlphy avatar Jul 23 '19 10:07 JessicaAlphy