Ignore:
Timestamp:
07/18/16 12:26:03 (8 years ago)
Author:
sherbold
Message:
  • code documentation and formatting
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrossPare/src/de/ugoe/cs/cpdp/dataselection/PointWiseEMClusterSelection.java

    r86 r135  
    3131 * Use in Config: 
    3232 *  
    33  * Specify number of clusters -N = Num Clusters <pointwiseselector 
    34  * name="PointWiseEMClusterSelection" param="-N 10"/> 
     33 * Specify number of clusters -N = Num Clusters 
     34 * <pointwiseselector name="PointWiseEMClusterSelection" param="-N 10"/> 
    3535 *  
    3636 * 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"/> 
    3939 *  
    4040 * Don't forget to add: <preprocessor name="Normalization" param=""/> 
     
    4242public class PointWiseEMClusterSelection implements IPointWiseDataselectionStrategy { 
    4343 
     44    /** 
     45     * paramters passed to the selection 
     46     */ 
    4447    private String[] params; 
    4548 
     49    /* 
     50     * (non-Javadoc) 
     51     *  
     52     * @see de.ugoe.cs.cpdp.IParameterizable#setParameter(java.lang.String) 
     53     */ 
    4654    @Override 
    4755    public void setParameter(String parameters) { 
     
    108116            } 
    109117 
    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")); 
    113120 
    114121            // 5. get cluster membership of our traindata 
     
    127134            for (int j = 0; j < ctrain.numInstances(); j++) { 
    128135                // 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", "")); 
    132138 
    133139                // Console.traceln(Level.INFO, 
     
    145151            } 
    146152 
    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())); 
    150155        } 
    151156        catch (Exception e) { 
Note: See TracChangeset for help on using the changeset viewer.