[ 
https://issues.apache.org/jira/browse/MAHOUT-596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yuval Merhav updated MAHOUT-596:
--------------------------------

    Attachment: TestAbstractCluster.java

Default:
Three one dimensional points with value of 1.0 each.
Weight = 10 

> Testing if the weight assigned to points when calling the observe method in 
> AbstractCluster incorrectly affect the number of points in a cluster 
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MAHOUT-596
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-596
>             Project: Mahout
>          Issue Type: Test
>          Components: Clustering
>    Affects Versions: 0.5
>            Reporter: Yuval Merhav
>            Priority: Minor
>         Attachments: TestAbstractCluster.java
>
>
> See the observe method in AbstractCluster:
> public void observe(Vector x, double weight) {
>     s0 += weight;
>     Vector weightedX = x.times(weight);
>  ....
>   }
> And then the computeParameters method:
>  
> public void computeParameters() {
>     ...
>  numPoints = (int) s0;
>     ...
> }
> So if someone changes the weight from the default value 1.0, it affects the 
> number of points in the cluster. It does not
> however affect the centroid (which I'm not sure if that's correct or not -- 
> depends on what the author meant to use the weight for).
> I attached a few simple test cases that fail. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to