codematrix.java

来自「dragontoolkit用于机器学习」· Java 代码 · 共 46 行

JAVA
46
字号
package dragon.ir.classification.multiclass;/** * <p>Code Matrix Interface</p> * <p>The code matrix handle the problem of how to build a set of binary classifiers for multi-class classification. A row of the code * matrix corresponds to a class label and the column a binary classsifer. The cell value at row i and column j can be -1, 0, or +1. -1 * means the training examples of category i will be used as negative examples for the j-th binary classifier. +1 * means the training * examples of category i will be used as positive examples for the j-th binary classifier. O means not used for training. <br><br> * More details can be found in the following paper:<br> * Allwein, E.L., Schapire, R.E., and Singer, Y., “Reducing multiclass to binary: A unifying approach for margin classifiers,” * Journal of Machine Learning Research, 1:113–141, 2000.</p> * <p>Copyright: Copyright (c) 2005</p> * <p>Company: IST, Drexel University</p> * @author Davis Zhou * @version 1.0 */public interface CodeMatrix {    /**     * Gets the number of categories     * @return the number of categories     */    public int getClassNum();    /**     * Sets the number of categories     * @param classNum the number of categories     */    public void setClassNum(int classNum);    /**     * Gets the number of binary classifiers     * @return the number of binary classifiers     */    public int getClassifierNum();    /**     * Gets the code value for specified category and binary classifier     * @param classIndex the index of the category     * @param classifierIndex the index of the binary classifier     * @return -1, 0, +1. -1 means the training examples of category i will be used as negative examples for the j-th binary classifier.     * +1 means the training examples of category i will be used as positive examples for the j-th binary classifier. O means not used     * for training.     */    public int getCode(int classIndex, int classifierIndex);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?