亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? rdgcategorizer.java

?? java數據挖掘算法
?? JAVA
字號:
package id3;
import java.io.*;
import shared.*;
import shared.Error;

/** Categorizer goes down the RootedCatGraph using the Categorizer at each node
 * until it reaches a node with no children. That node returns the category.
 *
 */
public class RDGCategorizer extends Categorizer {
    /** The rooted categorizer graph which is searched.
     */
    protected RootedCatGraph rcGraph;
    /** The distribution type of the leaves in this graph categorizer.
     */
    protected byte leafDistType;  //TDDTInducer.LeafDistType enum
    /** The leaf distribution parameter.
     */
    protected double leafDistParameter;
    /** TRUE if there are loss values for each node, FALSE otherwise.
     */
    protected boolean hasNodeLosses;
    
    /** Initializes the RDGCategorizer.
     * @param rcg The categorizer graph used for this RDGCategorizer.
     * @param descr The description of this RDGCategorizer.
     * @param numCat The number of possible category values.
     * @param sch The schema associated with the data this RDGCategorizer categorizes.
     */
    public RDGCategorizer(RootedCatGraph rcg, String descr, int numCat,
    Schema sch) {
        super(numCat,descr,sch);
        rcGraph = rcg;  //Change to copy constructor
        leafDistType = TDDTInducer.allOrNothing;
        leafDistParameter = 1.0;
        hasNodeLosses = false;
        
        rcg = null;
        if (rcGraph != null) {
            NodeCategorizer rootCat =
            ((NodeInfo)rcGraph.get_graph().entry(rcGraph.get_root())).get_categorizer();
            if (rootCat.has_distr())
                set_distr(rootCat.get_distr());
        }
        
        //      /*  NOT FINISHED HERE */
        //      System.out.println("Warning-->RDGCategorizer constructor not fully "
        //            + "implmented ");
    }
    
    /** Returns the number of nodes in this RDGCategorizer.
     * @return The number of nodes in this RDGCategorizer.
     */
    public int num_nodes() {
        return rooted_cat_graph().num_nodes();
    }
    /** Returns the number of leaves in this RDGCategorizer.
     * @return The number of leaves in this RDGCategorizer.
     */
    public int num_leaves() {
        return rooted_cat_graph().num_leaves();
    }
    
    /** Returns the number of nontrivial leaves in this RDGCategorizer.
     * @return The number of nontrivial leaves in this RDGCategorizer.
     */
    public int num_nontrivial_leaves() {
        return rooted_cat_graph().num_nontrivial_leaves();
    }
    
    /** Returns the number of nontrivial nodes in this RDGCategorizer.
     * @return The number of nontrivial nodes in this RDGCategorizer.
     */
    public int num_nontrivial_nodes() {
        return rooted_cat_graph().num_nontrivial_nodes();
    }
    
    /** Returns the graph of categorizers.
     * @return The graph of categorizers.
     */
    public RootedCatGraph rooted_cat_graph() {
        if(rcGraph == null)
            Error.err("RootedCatGraph.rooted_cat_graph: null rcGrph"
            + "-->fatal_error");
        return rcGraph;
    }
    
    /** We intend to replace each real threshold value with the value of the instance
     * nearest (less than or equal) it in value. For each attribute, build a list
     * (array) of all associated thresholds. This will eventually hold the modified
     * thresholds, to be copied back into the graph, so keep a NodePtr with each
     * threshold. Also, build a list (array) of all values for this attribute obtained
     * from instanceList. Sort the lists. For each attribute, walk throuhgh the two
     * data structures, replacing the threshold value in the first with the greatest
     * item from the second that is less than or equal to the threshold it is
     * replacing. Update the graph--for each node with a real-valued threshold
     * categorizer, identify the item in the array with the same NodePtr, and copy the
     * updated threshold back into the graph.
     * @param instances The instances over which thresholds are found.
     */
    public void adjust_real_thresholds(InstanceList instances) {
        System.out.println("Warning-->RDGCategorizer.adjust_real_thresholds"
        +" not implemented yet, add support for real values");
    }
    
    /** Set the leaf distribution type parameters, so that we can properly reconstruct
     * leaf nodes when backfitting.
     *
     * @param ldType The leaf distribution type.
     * @param mEst Laplace correction estimate.
     * @param eviFactor Evidence projection factor.
     */
    public void set_leaf_dist_params(byte ldType, double mEst, double eviFactor) {
        leafDistType = ldType;
        
        switch(new Byte(leafDistType).intValue()) {
            case TDDTInducer.allOrNothing:
            case TDDTInducer.frequencyCounts:
                leafDistParameter = 1.0;
                break;
            case TDDTInducer.laplaceCorrection:
                leafDistParameter = mEst;
                break;
            case TDDTInducer.evidenceProjection:
                leafDistParameter = eviFactor;
                break;
            default:
                System.out.println("RDGCategorizer.set_leaf_dist_params"
                +" ABORT_IF_REACHED");
        }
    }
    
    /** Prints a readable representation of the categorizer to the given stream.
     *
     * @param stream The stream to which this RDGCategorizer is printed.
     * @param dp The display preferences.
     */
    public void display_struct(BufferedWriter stream,
    DisplayPref dp) {
        try{
            if (dp.preference_type() == DisplayPref.ASCIIDisplay)
                stream.write("Rooted Decision Graph Categorizer "+description()+'\n');
            rcGraph.display(hasNodeLosses, get_schema().has_loss_matrix(), stream, dp);
        }catch(IOException e){e.printStackTrace();}
    }
    
    /** Updates usedAttr to include the attributes used in this categorizer.
     *
     * @param usedAttr The array of used attributes. TRUE values indicate the attribute with the index
     * number is used, FALSE otherwise.
     */
    public void set_used_attr(boolean[] usedAttr) {
        rcGraph.set_used_attr(usedAttr);
    }
    
    /** Cateogrize the given instance.
     * @param inst The instance to be categorized.
     * @return The category for this instance.
     */
    public AugCategory categorize(Instance inst) {
        CatDist dist = score(inst);
        AugCategory augCat = dist.best_category();
        dist = null;
        return augCat;
    }
    
    /** Score the given instance.
     * @param inst The instance to be scored.
     * @return The categorizer distribution for this instance.
     */
    public CatDist score(Instance inst) {
        return score_from_node(inst, rcGraph.get_root(true),false);
    }
    
    /** Score the given instance using the current node.
     * @param inst The instance to be scored.
     * @param currentNode The node used for scoring.
     * @param computeNodeLoss TRUE if the node loss values are to be calculated, FALSE otherwise.
     * @return The categorizer distribution for this instance.
     */
    public CatDist score_from_node(Instance inst,
    Node currentNode,
    boolean computeNodeLoss) {
        //   DBGSLOW(OK());
        int correctCat = Globals.UNKNOWN_CATEGORY_VAL;
        
        if (computeNodeLoss) {
            correctCat = inst.label_info().get_nominal_val(inst.get_label());
            if (correctCat == Globals.UNKNOWN_CATEGORY_VAL)
                Error.fatalErr("RDGCategorizer::score_from_node: computeNodeLoss is "
                +"TRUE, yet instance "+inst
                +" has UNKNOWN_CATEGORY_VAL");
        }
        
        NodeCategorizer cat = rcGraph.get_categorizer(currentNode);
        
        return cat.score(inst, computeNodeLoss);
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品久久国产字幕高潮| 九九九精品视频| 欧美探花视频资源| 久久国产免费看| 亚洲丝袜制服诱惑| 精品乱人伦小说| www.日韩在线| 黑人巨大精品欧美一区| 亚洲日本青草视频在线怡红院| 欧美性xxxxxxxx| 国产成人小视频| 亚洲成人黄色影院| 亚洲视频你懂的| 国产三级一区二区| 日韩精品一区二区三区swag| 91碰在线视频| 成人免费的视频| 激情深爱一区二区| 蜜臀av在线播放一区二区三区| 综合激情网...| 国产精品欧美久久久久一区二区| 欧美三级电影在线观看| 91丝袜美女网| 色哟哟在线观看一区二区三区| 丁香婷婷综合五月| 风间由美一区二区三区在线观看| 亚洲电影欧美电影有声小说| 亚洲主播在线观看| 视频一区中文字幕| 日韩国产在线一| 久久成人免费网| 成人丝袜18视频在线观看| 麻豆精品视频在线观看视频| 日本亚洲欧美天堂免费| 国产一区二区0| 成人国产一区二区三区精品| thepron国产精品| 欧美在线看片a免费观看| 欧美一区二区在线看| 91精品国产一区二区三区香蕉| 欧美一激情一区二区三区| 26uuu精品一区二区在线观看| 国产欧美一区二区在线| 亚洲一区中文在线| 国产一区二区在线电影| 99免费精品视频| 欧美一级日韩免费不卡| 国产精品美女久久久久久| 亚洲国产精品综合小说图片区| 麻豆国产精品一区二区三区| 波多野结衣中文一区| 日韩一区二区三区视频在线 | 麻豆国产精品视频| 91欧美一区二区| 欧美激情一区在线| 国产在线精品一区二区| 欧美性欧美巨大黑白大战| 国产精品天干天干在观线| 久久97超碰国产精品超碰| 5566中文字幕一区二区电影| 亚洲色图清纯唯美| 99视频国产精品| 国产欧美一区二区三区鸳鸯浴 | 日韩精品一级二级| 91福利视频在线| 一区二区三区成人| 欧美日韩一区二区在线视频| 国产亚洲精品精华液| 国产高清亚洲一区| 欧美韩国日本一区| 99久久99久久精品免费观看| 中文字幕亚洲不卡| 99久久精品国产毛片| 国产精品免费看片| 日本一不卡视频| 欧美体内she精视频| 久久久国产一区二区三区四区小说| 日韩精品一区国产麻豆| 亚洲精品福利视频网站| 欧美日韩一卡二卡三卡| 激情另类小说区图片区视频区| 26uuu色噜噜精品一区| 成人av网站在线| 国产精品丝袜91| 91精品国产综合久久香蕉麻豆 | 亚洲女人的天堂| 日韩欧美国产小视频| 视频一区在线视频| 欧美激情综合网| 4438亚洲最大| av一区二区三区在线| 日韩成人一级大片| 亚洲精品国产一区二区三区四区在线| 欧美日韩国产大片| 成人不卡免费av| 玖玖九九国产精品| 亚洲欧美日韩国产综合| 国产午夜亚洲精品羞羞网站| 欧美视频在线不卡| 99视频精品在线| 国产精品主播直播| 国产美女娇喘av呻吟久久| 日韩成人伦理电影在线观看| 亚洲精品一卡二卡| 亚洲天堂中文字幕| 综合网在线视频| 久久久国产综合精品女国产盗摄| 欧美三级乱人伦电影| 在线视频欧美精品| 一本大道综合伊人精品热热| 色综合一个色综合亚洲| 99国产精品国产精品毛片| av男人天堂一区| 91在线视频免费观看| 91在线观看一区二区| 91丨porny丨国产入口| 99久久er热在这里只有精品66| 91在线精品秘密一区二区| 色婷婷国产精品| 欧美日韩激情在线| 亚洲精品一区在线观看| 久久久影院官网| 一卡二卡欧美日韩| 日日摸夜夜添夜夜添精品视频| 青草国产精品久久久久久| 激情小说欧美图片| 色94色欧美sute亚洲线路一久| 在线视频欧美精品| 国产女人18水真多18精品一级做 | 欧美在线视频你懂得| 欧美精品123区| 国产精品福利在线播放| 日韩激情av在线| 欧美在线视频日韩| 成人免费视频一区| 欧美一区二区三区在线电影| 国产婷婷色一区二区三区在线| 怡红院av一区二区三区| 成人午夜av电影| 欧美成人video| 日韩电影一二三区| 91麻豆福利精品推荐| 国产欧美日本一区视频| 日本视频在线一区| 欧美高清精品3d| 丝袜诱惑制服诱惑色一区在线观看| 成人激情图片网| 精品成人在线观看| 青青青爽久久午夜综合久久午夜| 在线免费观看视频一区| 中文字幕va一区二区三区| 国产精品一二二区| 久久影院视频免费| 久久不见久久见免费视频7| 91精品久久久久久久91蜜桃| 午夜欧美电影在线观看| 日韩一区二区三区电影在线观看 | 日本成人在线一区| 日韩丝袜情趣美女图片| 久久国产尿小便嘘嘘| 久久这里只有精品6| 国产高清精品久久久久| 国产精品私人影院| 91久久香蕉国产日韩欧美9色| 亚洲精品大片www| 日韩一区二区高清| 国产69精品一区二区亚洲孕妇| 国产午夜精品理论片a级大结局 | 久久精品噜噜噜成人88aⅴ| 精品日韩欧美在线| 91免费视频网| 青青草视频一区| 国产精品福利av| 欧美sm美女调教| 色婷婷av久久久久久久| 久久激情五月激情| 伊人性伊人情综合网| 久久综合九色欧美综合狠狠| av亚洲精华国产精华| 精品一区二区三区免费播放| 国产精品热久久久久夜色精品三区| 在线观看91精品国产麻豆| 粉嫩在线一区二区三区视频| 日本亚洲免费观看| 亚洲国产欧美在线| 一区二区三区日韩精品| 日本一区二区免费在线观看视频 | 日本不卡一二三区黄网| 亚洲人成网站色在线观看| 久久精品人人做人人综合| 欧美日本在线播放| 欧美视频一区二区| 91亚洲精华国产精华精华液| 成人一区二区三区在线观看| 久久爱www久久做| 国产成人精品亚洲日本在线桃色| 久久99热这里只有精品| 老司机精品视频在线| 久久草av在线| www.亚洲人|