weka.classifiers.meta
Class MultiClassClassifier.RandomCode

java.lang.Object
  extended byweka.classifiers.meta.MultiClassClassifier.Code
      extended byweka.classifiers.meta.MultiClassClassifier.RandomCode
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
MultiClassClassifier

private class MultiClassClassifier.RandomCode
extends MultiClassClassifier.Code

Constructs a random code assignment


Field Summary
protected  boolean[][] m_Codebits
          Subclasses must allocate and fill these.
(package private)  java.util.Random r
           
 
Constructor Summary
MultiClassClassifier.RandomCode(int numClasses, int numCodes, Instances data)
           
 
Method Summary
 java.lang.String getIndices(int which)
          Returns the indices of the values set to true for this code, using 1-based indexing (for input to Range).
private  boolean good()
           
private  void randomize()
           
 int size()
          Returns the number of codes.
 java.lang.String toString()
          Returns a human-readable representation of the codes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

r

java.util.Random r

m_Codebits

protected boolean[][] m_Codebits
Subclasses must allocate and fill these. First dimension is number of codes. Second dimension is number of classes.

Constructor Detail

MultiClassClassifier.RandomCode

public MultiClassClassifier.RandomCode(int numClasses,
                                       int numCodes,
                                       Instances data)
Method Detail

good

private boolean good()

randomize

private void randomize()

size

public int size()
Returns the number of codes.


getIndices

public java.lang.String getIndices(int which)
Returns the indices of the values set to true for this code, using 1-based indexing (for input to Range).


toString

public java.lang.String toString()
Returns a human-readable representation of the codes.