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

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

?? rdgcategorizer.java

?? 數據倉庫挖掘與開發 ID3算法實現代碼
?? 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久久九九| 久久综合久久综合久久| 一本色道久久综合精品竹菊| 不卡的av电影在线观看| 国产69精品久久99不卡| 懂色av一区二区三区蜜臀| 成人免费毛片a| 成人网在线免费视频| 成人免费视频视频在线观看免费| 成人av在线一区二区三区| 91亚洲精品久久久蜜桃网站 | 国产91丝袜在线播放九色| 国产一区二区三区免费在线观看| 国产在线国偷精品免费看| 高清成人免费视频| 一本久久a久久免费精品不卡| 欧美三级电影网| 3d动漫精品啪啪| 国产欧美日产一区| 一二三四区精品视频| 日韩中文欧美在线| 国产裸体歌舞团一区二区| 91丨porny丨中文| 8x8x8国产精品| 国产片一区二区| 亚洲超碰精品一区二区| 激情欧美日韩一区二区| 在线观看日韩精品| 26uuu久久天堂性欧美| 亚洲精品国产精品乱码不99| 精品一区二区三区在线播放视频| 成人av免费在线播放| 欧美丰满美乳xxx高潮www| 久久精品一区四区| 图片区小说区区亚洲影院| 国产99久久精品| 欧美久久久久久久久| 国产精品国产三级国产| 日本在线不卡视频一二三区| 国产成人av电影在线| 制服视频三区第一页精品| 国产精品成人一区二区艾草 | 国产黄色精品网站| 欧美性猛片xxxx免费看久爱| 精品国产乱码久久久久久久久| 亚洲精品网站在线观看| 国产成人午夜视频| 欧美一区二区三区在线观看视频| 国产精品国产三级国产专播品爱网 | 精品影院一区二区久久久| 色综合天天综合| 国产欧美一区二区三区沐欲| 肉肉av福利一精品导航| 色美美综合视频| 中文一区在线播放| 另类小说综合欧美亚洲| 欧美高清视频在线高清观看mv色露露十八| 国产亚洲欧美日韩俺去了| 美女网站视频久久| 欧美一区二区三区免费观看视频| 亚洲最大的成人av| 色综合天天综合网天天狠天天 | 丝袜国产日韩另类美女| 97久久超碰国产精品| 国产精品久久毛片av大全日韩| 国产一区二区三区四区在线观看| 欧美一区二区视频网站| 日一区二区三区| 日韩一区二区在线观看视频| 日韩精品成人一区二区三区| 欧美日韩精品一区二区三区四区 | 中文字幕一区三区| 成人免费av资源| 欧美国产激情一区二区三区蜜月| 狠狠色丁香久久婷婷综合_中| 欧美精品一区二区在线播放| 国产电影精品久久禁18| 中文字幕乱码久久午夜不卡| 国产成人精品aa毛片| 中文字幕在线不卡视频| 一本色道久久综合精品竹菊| 亚洲一区在线观看免费| 欧美伦理视频网站| 久久国产剧场电影| 国产午夜亚洲精品羞羞网站| 成人一区二区视频| 亚洲精品成人精品456| 欧美色图一区二区三区| 肉色丝袜一区二区| 久久久国产精品不卡| 99re免费视频精品全部| 亚洲国产日韩一级| 欧美mv和日韩mv的网站| 懂色av噜噜一区二区三区av| 亚洲精品乱码久久久久久黑人| 欧美麻豆精品久久久久久| 国产一区二区精品久久91| 中文av字幕一区| 欧美影视一区在线| 激情文学综合网| 亚洲免费在线视频一区 二区| 91精选在线观看| 粉嫩高潮美女一区二区三区| 亚洲成人精品在线观看| 欧美成人一区二区三区在线观看| 处破女av一区二区| 午夜成人免费电影| 国产精品私人影院| 欧美一区二区高清| 成人av资源网站| 精品一区二区三区久久| 亚洲视频一区在线| 精品久久人人做人人爰| 欧美午夜寂寞影院| 国产精品1024| 蜜臀av性久久久久蜜臀aⅴ流畅 | 在线成人午夜影院| 暴力调教一区二区三区| 欧美96一区二区免费视频| ...av二区三区久久精品| 亚洲精品一线二线三线无人区| 91美女片黄在线观看91美女| 国内一区二区视频| 日日嗨av一区二区三区四区| 亚洲美女屁股眼交3| 国产视频在线观看一区二区三区 | 欧美一区二区三区在线观看视频| 99精品欧美一区二区蜜桃免费| 久久不见久久见免费视频1| 亚洲国产精品一区二区久久恐怖片| 国产精品美女久久久久aⅴ| 欧美变态口味重另类| 制服视频三区第一页精品| 91美女在线看| 91在线观看视频| 成人国产精品免费观看| 黄色日韩网站视频| 蜜桃免费网站一区二区三区| 亚洲一区二区三区自拍| 日韩码欧中文字| 18欧美亚洲精品| 国产精品传媒入口麻豆| 国产精品国产馆在线真实露脸| 国产视频亚洲色图| 国产亚洲女人久久久久毛片| 久久婷婷综合激情| 久久久91精品国产一区二区精品 | 亚洲欧美电影院| 国产精品第五页| 亚洲色图都市小说| 亚洲国产一区在线观看| 亚洲男人天堂av| 亚洲成人一区二区| 丝瓜av网站精品一区二区| 日韩福利视频网| 另类小说色综合网站| 国产精品系列在线观看| 国产99精品国产| 色噜噜狠狠成人中文综合| 欧美最猛性xxxxx直播| 欧美主播一区二区三区美女| 欧美日韩国产大片| 欧美va亚洲va香蕉在线| 欧美极品另类videosde| 亚洲欧美激情一区二区| 天天免费综合色| 韩日av一区二区| 不卡视频在线观看| 欧美性猛交xxxxxxxx| 91精品国产一区二区| 2014亚洲片线观看视频免费| 中文字幕高清不卡| 亚洲一区二区在线播放相泽| 日本不卡视频一二三区| 国产不卡视频一区二区三区| 91麻豆国产福利在线观看| 91精品国产综合久久久蜜臀粉嫩| 精品国产成人在线影院| 亚洲私人影院在线观看| 免费观看一级特黄欧美大片| 国产经典欧美精品| 欧美人动与zoxxxx乱| 久久先锋资源网| 一区二区三区蜜桃| 国产一区二区日韩精品| 91久久国产最好的精华液| 欧美电影免费观看高清完整版在线 | 国产伦精品一区二区三区免费迷| av电影在线不卡| 日韩视频中午一区| 亚洲乱码国产乱码精品精98午夜 | 国产精品久久影院| 视频精品一区二区| 99精品黄色片免费大全| 久久综合狠狠综合| 一区二区三区国产精品| 国产盗摄一区二区三区| 日韩视频免费直播| 一区二区三区毛片| 不卡一区在线观看|