You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Thomas Neidhart (JIRA)" <ji...@apache.org> on 2014/11/06 21:19:34 UTC

[jira] [Deleted] (MATH-1164) Rare case for updateMembershipMatrix() in FuzzyKMeansClusterer

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

Thomas Neidhart deleted MATH-1164:
----------------------------------


> Rare case for updateMembershipMatrix() in FuzzyKMeansClusterer
> --------------------------------------------------------------
>
>                 Key: MATH-1164
>                 URL: https://issues.apache.org/jira/browse/MATH-1164
>             Project: Commons Math
>          Issue Type: Bug
>            Reporter: Pashutan Modaresi
>            Priority: Minor
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The function updateMembershipMatrix() in FuzzyKMeansClusterer assigns the points to the cluster with the highest membership. Consider the following case:
> If the distance between a point and the cluster center is zero, then we will have a cluster membership of one, and all other membership values will be zero.
> So the if condition:
> if (membershipMatrix[i][j] > maxMembership) {
>                     maxMembership = membershipMatrix[i][j];
>                     newCluster = j;
> }
> will never be true during the for loop and newCluster will remain -1. This will throw an exception because of the line:
> clusters.get(newCluster)
>                     .addPoint(point);
> Adding the following condition can solve the problem:
> double d;
> if (sum == 0)
> d = 1;
> else
> d = 1.0/sum;



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Re: Fwd: [jira] [Deleted] (MATH-1164) Rare case for updateMembershipMatrix() in FuzzyKMeansClusterer

Posted by Phil Steitz <ph...@gmail.com>.
On 11/6/14 2:55 PM, Thomas Neidhart wrote:
> On 11/06/2014 10:08 PM, Phil Steitz wrote:
>> Hey Thomas,
>>
>> Did you actually mean to delete this?
> yes, it is a duplicate issue, see MATH-1165
>
> Seems to happen again lately when users create new issues.

Oh, sorry.
>
> Thomas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: Fwd: [jira] [Deleted] (MATH-1164) Rare case for updateMembershipMatrix() in FuzzyKMeansClusterer

Posted by Thomas Neidhart <th...@gmail.com>.
On 11/06/2014 10:08 PM, Phil Steitz wrote:
> Hey Thomas,
> 
> Did you actually mean to delete this?

yes, it is a duplicate issue, see MATH-1165

Seems to happen again lately when users create new issues.

Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Fwd: [jira] [Deleted] (MATH-1164) Rare case for updateMembershipMatrix() in FuzzyKMeansClusterer

Posted by Phil Steitz <ph...@gmail.com>.
Hey Thomas,

Did you actually mean to delete this?

Phil


-------- Forwarded Message --------
Subject: 	[jira] [Deleted] (MATH-1164) Rare case for
updateMembershipMatrix() in FuzzyKMeansClusterer
Date: 	Thu, 6 Nov 2014 20:19:34 +0000 (UTC)
From: 	Thomas Neidhart (JIRA) <ji...@apache.org>
Reply-To: 	issues@commons.apache.org
To: 	issues@commons.apache.org



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

Thomas Neidhart deleted MATH-1164:
----------------------------------


> Rare case for updateMembershipMatrix() in FuzzyKMeansClusterer
> --------------------------------------------------------------
>
>                 Key: MATH-1164
>                 URL: https://issues.apache.org/jira/browse/MATH-1164
>             Project: Commons Math
>          Issue Type: Bug
>            Reporter: Pashutan Modaresi
>            Priority: Minor
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The function updateMembershipMatrix() in FuzzyKMeansClusterer assigns the points to the cluster with the highest membership. Consider the following case:
> If the distance between a point and the cluster center is zero, then we will have a cluster membership of one, and all other membership values will be zero.
> So the if condition:
> if (membershipMatrix[i][j] > maxMembership) {
>                     maxMembership = membershipMatrix[i][j];
>                     newCluster = j;
> }
> will never be true during the for loop and newCluster will remain -1. This will throw an exception because of the line:
> clusters.get(newCluster)
>                     .addPoint(point);
> Adding the following condition can solve the problem:
> double d;
> if (sum == 0)
> d = 1;
> else
> d = 1.0/sum;



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org