Github user mengxr commented on a diff in the pull request:
https://github.com/apache/spark/pull/1778#discussion_r17579687
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/stat/MultivariateStatisticalSummary.scala
---
@@ -53,4 +53,14 @@ trait MultivariateStatisticalSummary {
* Minimum value of each column.
*/
def min: Vector
+
+ /**
+ * Euclidean magnitude of each column
+ */
+ def normL2: Vector
+
+ /**
+ * L1 norm of each column
+ */
+ def normL1: Vector
--- End diff --
`mean`, `stddev`, and `variance` are summary statistics of the random
variable. The 1-norm of a random variable should be `E[|X|]` instead of `\sum_i
|x_i|`. See http://www.math.uah.edu/stat/expect/Spaces.html . I suggest
changing the method names to `norm1` and `norm2` and outputs the average
instead.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]