Author: scooter
Date: 2011-04-08 15:22:46 -0700 (Fri, 08 Apr 2011)
New Revision: 24730
Modified:
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/hierarchical/DistanceMetric.java
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/hierarchical/EisenCluster.java
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/hierarchical/HierarchicalCluster.java
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/kmeans/KMeansCluster.java
Log:
Add a "none" distance metric, which assumes that the edge attribute is already
a correlation.
Modified:
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/hierarchical/DistanceMetric.java
===================================================================
---
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/hierarchical/DistanceMetric.java
2011-04-08 22:21:29 UTC (rev 24729)
+++
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/hierarchical/DistanceMetric.java
2011-04-08 22:22:46 UTC (rev 24730)
@@ -36,6 +36,7 @@
import java.lang.Math;
public enum DistanceMetric {
+ VALUE_IS_CORRELATION("None -- attributes are correlations"),
UNCENTERED_CORRELATION("Uncentered correlation"),
CORRELATION("Pearson correlation"),
ABS_UNCENTERED_CORRELATION("Uncentered correlation, absolute value"),
@@ -74,6 +75,8 @@
return spearmanMetric(data1, data2, weights,
index1, index2);
case KENDALLS_TAU:
return kendallMetric(data1, data2, weights,
index1, index2);
+ case VALUE_IS_CORRELATION:
+ return data1.doubleValue(index1, index2);
}
return euclidMetric(data1, data2, weights, index1, index2);
}
Modified:
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/hierarchical/EisenCluster.java
===================================================================
---
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/hierarchical/EisenCluster.java
2011-04-08 22:21:29 UTC (rev 24729)
+++
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/hierarchical/EisenCluster.java
2011-04-08 22:22:46 UTC (rev 24730)
@@ -325,7 +325,6 @@
List<String>clList =
(List<String>)netAttr.getListAttribute(netID, ClusterMaker.GROUP_ATTRIBUTE);
for (String groupName: clList) {
CyGroup group =
CyGroupManager.findGroup(groupName);
- // XXX FIXME XXX This doesn't seem to be working
if (group != null)
CyGroupManager.removeGroup(group);
}
Modified:
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/hierarchical/HierarchicalCluster.java
===================================================================
---
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/hierarchical/HierarchicalCluster.java
2011-04-08 22:21:29 UTC (rev 24729)
+++
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/hierarchical/HierarchicalCluster.java
2011-04-08 22:22:46 UTC (rev 24730)
@@ -69,7 +69,8 @@
DistanceMetric.UNCENTERED_CORRELATION,
DistanceMetric.ABS_UNCENTERED_CORRELATION,
DistanceMetric.SPEARMANS_RANK,
- DistanceMetric.KENDALLS_TAU };
+ DistanceMetric.KENDALLS_TAU,
+ DistanceMetric.VALUE_IS_CORRELATION
};
String[] attributeArray = new String[1];
ClusterMethod clusterMethod = ClusterMethod.AVERAGE_LINKAGE;
Modified:
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/kmeans/KMeansCluster.java
===================================================================
---
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/kmeans/KMeansCluster.java
2011-04-08 22:21:29 UTC (rev 24729)
+++
csplugins/trunk/ucsf/scooter/clusterMaker/src/clusterMaker/algorithms/kmeans/KMeansCluster.java
2011-04-08 22:22:46 UTC (rev 24730)
@@ -66,7 +66,8 @@
DistanceMetric.UNCENTERED_CORRELATION,
DistanceMetric.ABS_UNCENTERED_CORRELATION,
DistanceMetric.SPEARMANS_RANK,
- DistanceMetric.KENDALLS_TAU };
+ DistanceMetric.KENDALLS_TAU,
+ DistanceMetric.VALUE_IS_CORRELATION
};
String[] attributeArray = new String[1];
int kNumber = 0;
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.