Carsten Schnober created SPARK-10356: ----------------------------------------
Summary: MLlib: Normalization should use absolute values Key: SPARK-10356 URL: https://issues.apache.org/jira/browse/SPARK-10356 Project: Spark Issue Type: Bug Components: MLlib Affects Versions: 1.4.1 Reporter: Carsten Schnober The normalizer does not handle vectors with negative values properly. It can be tested with the following code {{ val normalized = new Normalizer(1.0).transform(v: Vector) normalizer.toArray.sum == 1.0 }} This yields true if all values in Vector v are positive, but false when v contains one or more negative values. This is because the values in v are taken immediately without applying {{abs()}}, This (probably) does not occur for {{p=2.0}} because the values are squared and hence positive anyway. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org