[
https://issues.apache.org/jira/browse/SAMOA-7?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14352653#comment-14352653
]
ASF GitHub Bot commented on SAMOA-7:
------------------------------------
Github user arinto commented on a diff in the pull request:
https://github.com/apache/incubator-samoa/pull/15#discussion_r26019206
--- Diff:
samoa-api/src/main/java/com/yahoo/labs/samoa/evaluation/measures/SilhouetteCoefficient.java
---
@@ -60,6 +60,7 @@ public void evaluateClustering(Clustering clustering,
Clustering trueClustering,
for (int p = 0; p < points.size(); p++) {
DataPoint point = points.get(p);
ArrayList<Integer> ownClusters = new ArrayList<>();
+ double pointInclusionProbThreshold = 0.8;
--- End diff --
What if we use `private static final double` for this threshold?
So that the threshold is immutable and we don't need unnecessary
declaration in line 63.
> Unnecessary Distance method in SilhoutteCoefficient.java
> --------------------------------------------------------
>
> Key: SAMOA-7
> URL: https://issues.apache.org/jira/browse/SAMOA-7
> Project: SAMOA
> Issue Type: Bug
> Components: SAMOA-API
> Reporter: Suneel Marthi
> Assignee: Suneel Marthi
> Priority: Minor
>
> There's an unnecessary distance() method in SilhoutteCoefficient.java. This
> could be replaced by a call to dataPoint.getDistance(dataPoint1).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)