You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Carsten Schnober (JIRA)" <ji...@apache.org> on 2015/08/30 13:26:46 UTC
[jira] [Created] (SPARK-10356) MLlib: Normalization should use
absolute values
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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org