?? categorizer.java
字號:
package shared;
import java.lang.*;
import java.io.*;
/** Abstract base class for Categorizers. Number of categories must be
* strictly positive (greater than zero). Description cannot be empty or NULL.
* @author James Louis 2/25/2001 Ported to Java.
* @author Chia-Hsin Li 11/29/94 Add function building probability
* distribution array.
* @author Ronny Kohavi 8/03/93 Initial revision
*/
abstract public class Categorizer extends Globals implements Cloneable {
/** The Schema of data this Categorizer can categorize. **/
private Schema schema;
/** The total weight of instances. **/
private double totalWeight;
/** Number of possible categories for labelling. **/
private int numCat;
/** Description of this Categorizer. **/
private String descr;
/** The distribution of weights. **/
private double[] distrArray;
/** The original distribution of weights. **/
private double[] originalDistr;
/** Extra text for visualization purposes. **/
private String extraVizText;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CATEGORIZER_ID_BASE = 0;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_CONST_CATEGORIZER = CATEGORIZER_ID_BASE + 1;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_MULTITHRESH_CATEGORIZER = CATEGORIZER_ID_BASE + 2;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_THRESHOLD_CATEGORIZER = CATEGORIZER_ID_BASE + 3;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_ATTR_CATEGORIZER = CATEGORIZER_ID_BASE + 4;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_RDG_CATEGORIZER = CATEGORIZER_ID_BASE + 5;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_BAD_CATEGORIZER = CATEGORIZER_ID_BASE + 6;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_TABLE_CATEGORIZER = CATEGORIZER_ID_BASE + 7;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_IB_CATEGORIZER = CATEGORIZER_ID_BASE + 8;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_LAZYDT_CATEGORIZER = CATEGORIZER_ID_BASE + 9;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_NB_CATEGORIZER = CATEGORIZER_ID_BASE + 10;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_PROJECT_CATEGORIZER = CATEGORIZER_ID_BASE + 11;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_DISC_CATEGORIZER = CATEGORIZER_ID_BASE + 12;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_ATTR_EQ_CATEGORIZER = CATEGORIZER_ID_BASE + 13;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_DTREE_CATEGORIZER = CATEGORIZER_ID_BASE + 14;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_BAGGING_CATEGORIZER = CATEGORIZER_ID_BASE + 15;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_LINDISCR_CATEGORIZER = CATEGORIZER_ID_BASE + 16;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_CASCADE_CATEGORIZER = CATEGORIZER_ID_BASE + 17;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_STACKING_CATEGORIZER = CATEGORIZER_ID_BASE + 18;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_ATTR_SUBSET_CATEGORIZER = CATEGORIZER_ID_BASE + 19;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_MULTI_SPLIT_CATEGORIZER = CATEGORIZER_ID_BASE + 20;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_ONE_R_CATEGORIZER = CATEGORIZER_ID_BASE + 21;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_CONSTRUCT_CATEGORIZER = CATEGORIZER_ID_BASE + 22;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_LEAF_CATEGORIZER = CATEGORIZER_ID_BASE + 24;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_DISC_NODE_CATEGORIZER = CATEGORIZER_ID_BASE + 25;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_MAJORITY_CATEGORIZER = CATEGORIZER_ID_BASE + 95;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_ODT_CATEGORIZER = CATEGORIZER_ID_BASE + 96;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_CLUSTER_CATEGORIZER = CATEGORIZER_ID_BASE + 97;
/** Class identification number.
* @deprecated The Java instanceof operator should be used instead of
* the numerical class identity system. **/
public static final int CLASS_OPTION_CATEGORIZER = CATEGORIZER_ID_BASE + 98;
/** Logging options for this class. **/
protected LogOptions logOptions = new LogOptions();
/** Sets the logging level for this object.
* @param level The new logging level.
*/
public void set_log_level(int level){logOptions.set_log_level(level);}
/** Returns the logging level for this object.
* @return The log level for this Object.
*/
public int get_log_level(){return logOptions.get_log_level();}
/** Sets the stream to which logging options are displayed.
* @param strm The stream to which logs will be written.
*/
public void set_log_stream(Writer strm)
{logOptions.set_log_stream(strm);}
/** Returns the stream to which logs for this object are written.
* @return The stream to which logs for this object are written.
*/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -