Changeset 135 for trunk/CrossPare/src/de/ugoe/cs/cpdp/dataselection/PointWiseEMClusterSelection.java
- Timestamp:
- 07/18/16 12:26:03 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CrossPare/src/de/ugoe/cs/cpdp/dataselection/PointWiseEMClusterSelection.java
r86 r135 31 31 * Use in Config: 32 32 * 33 * Specify number of clusters -N = Num Clusters <pointwiseselector34 * name="PointWiseEMClusterSelection" param="-N 10"/>33 * Specify number of clusters -N = Num Clusters 34 * <pointwiseselector name="PointWiseEMClusterSelection" param="-N 10"/> 35 35 * 36 36 * Try to determine the number of clusters: -I 10 = max iterations -X 5 = 5 folds for cross 37 * evaluation -max = max number of clusters <pointwiseselector name="PointWiseEMClusterSelection"38 * param="-I 10 -X 5 -max 300"/>37 * evaluation -max = max number of clusters 38 * <pointwiseselector name="PointWiseEMClusterSelection" param="-I 10 -X 5 -max 300"/> 39 39 * 40 40 * Don't forget to add: <preprocessor name="Normalization" param=""/> … … 42 42 public class PointWiseEMClusterSelection implements IPointWiseDataselectionStrategy { 43 43 44 /** 45 * paramters passed to the selection 46 */ 44 47 private String[] params; 45 48 49 /* 50 * (non-Javadoc) 51 * 52 * @see de.ugoe.cs.cpdp.IParameterizable#setParameter(java.lang.String) 53 */ 46 54 @Override 47 55 public void setParameter(String parameters) { … … 108 116 } 109 117 110 Console.traceln(Level.INFO, 111 String.format("our testdata is in: " + selectedCluster.size() + 112 " different clusters")); 118 Console.traceln(Level.INFO, String 119 .format("our testdata is in: " + selectedCluster.size() + " different clusters")); 113 120 114 121 // 5. get cluster membership of our traindata … … 127 134 for (int j = 0; j < ctrain.numInstances(); j++) { 128 135 // get the cluster number from the attributes 129 cnumber = 130 Integer.parseInt(ctrain.get(j).stringValue(ctrain.get(j).numAttributes() - 1) 131 .replace("cluster", "")); 136 cnumber = Integer.parseInt(ctrain.get(j) 137 .stringValue(ctrain.get(j).numAttributes() - 1).replace("cluster", "")); 132 138 133 139 // Console.traceln(Level.INFO, … … 145 151 } 146 152 147 Console.traceln(Level.INFO, 148 String.format("that leaves us with: " + selected.numInstances() + 149 " traindata instances from " + traindata.numInstances())); 153 Console.traceln(Level.INFO, String.format("that leaves us with: " + 154 selected.numInstances() + " traindata instances from " + traindata.numInstances())); 150 155 } 151 156 catch (Exception e) {
Note: See TracChangeset
for help on using the changeset viewer.