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

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

?? rdgcategorizer.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一区二区三区免费野_久草精品视频
99re这里只有精品视频首页| 91免费在线看| 99久久精品国产一区| 欧美精品tushy高清| 国产精品色在线观看| 欧美大白屁股肥臀xxxxxx| 日韩av在线发布| 国产91对白在线观看九色| 日本乱人伦一区| 日本一区二区动态图| 免费在线一区观看| 欧美日韩一区二区在线观看| 国产日韩精品一区| 久久99久久99小草精品免视看| 一本大道久久精品懂色aⅴ| 国产亚洲精品bt天堂精选| 蜜臀av性久久久久蜜臀aⅴ| 在线一区二区视频| 亚洲婷婷综合久久一本伊一区| 国产在线视频精品一区| 日韩欧美精品三级| 三级久久三级久久久| 在线观看日韩国产| 亚洲精品高清在线| 91天堂素人约啪| 国产精品成人午夜| 成人国产在线观看| 国产精品美女久久久久久久久久久| 精久久久久久久久久久| 欧美电视剧免费全集观看| 日韩高清在线电影| 欧美一区三区四区| 免费成人你懂的| 日韩视频在线永久播放| 日本成人超碰在线观看| 精品少妇一区二区| 国产中文字幕精品| 国产婷婷一区二区| 成人av综合在线| 亚洲蜜臀av乱码久久精品蜜桃| 成人av在线电影| 亚洲人精品午夜| 日本韩国精品一区二区在线观看| 亚洲日本在线天堂| 欧美日韩国产成人在线91| 五月天丁香久久| 日韩午夜在线观看视频| 精品一区免费av| 国产婷婷色一区二区三区四区 | 91麻豆国产香蕉久久精品| 亚洲色图另类专区| 欧美天堂亚洲电影院在线播放| 午夜av一区二区| 精品剧情v国产在线观看在线| 国产精华液一区二区三区| 国产精品伦理一区二区| 91蜜桃网址入口| 爽好久久久欧美精品| 精品久久久久一区二区国产| 国产jizzjizz一区二区| 亚洲午夜久久久| 欧美sm美女调教| 成人免费视频网站在线观看| 亚洲精品乱码久久久久久久久| 欧美巨大另类极品videosbest| 激情综合五月天| 成人欧美一区二区三区白人 | 成人黄色a**站在线观看| 亚洲自拍偷拍九九九| 日韩视频免费观看高清完整版 | 久久激情五月婷婷| 亚洲区小说区图片区qvod| 欧美一区在线视频| 91在线免费视频观看| 奇米精品一区二区三区在线观看一| 精品福利在线导航| 欧美在线视频不卡| 国产成人欧美日韩在线电影| 午夜久久福利影院| 亚洲欧洲色图综合| 欧美精品一区二区久久久| 色婷婷久久综合| 丰满岳乱妇一区二区三区| 五月综合激情网| 亚洲精品国产无天堂网2021| 久久伊人中文字幕| 91精品福利在线一区二区三区| 99天天综合性| 国产精品自在欧美一区| 亚洲444eee在线观看| 亚洲日穴在线视频| 日本一区二区三区高清不卡| 777午夜精品免费视频| 日本道色综合久久| 成人av在线播放网址| 国产美女一区二区| 免费精品视频在线| 亚洲自拍偷拍综合| 亚洲日本青草视频在线怡红院 | 国产成人精品免费一区二区| 青青草伊人久久| 午夜精品久久久久久久久久久| 国产精品成人午夜| 国产精品国产三级国产三级人妇 | 亚洲色图在线播放| 国产精品美女久久久久久久网站| 久久影院午夜片一区| 精品久久久久久久久久久久久久久久久 | 99久久伊人网影院| 日韩精品电影一区亚洲| 亚洲一线二线三线视频| 亚洲欧美日韩综合aⅴ视频| 中文字幕一区二区三区精华液| 国产日韩成人精品| 国产精品视频线看| 亚洲天堂av一区| 亚洲丝袜自拍清纯另类| 亚洲欧美另类小说| 亚洲另类春色国产| 亚洲制服丝袜av| 亚洲成av人在线观看| 午夜欧美在线一二页| 秋霞电影网一区二区| 久久se这里有精品| 国产剧情在线观看一区二区| 国产成人在线视频播放| 成人a级免费电影| 日本高清不卡一区| 欧美日韩aaaaaa| 欧美成人乱码一区二区三区| 337p日本欧洲亚洲大胆精品| 久久一区二区三区四区| 国产精品久久综合| 亚洲激情图片qvod| 亚洲永久免费av| 青青草成人在线观看| 国产精品夜夜爽| 91美女片黄在线观看| 欧美日韩午夜在线| 欧美成人激情免费网| 亚洲国产精品激情在线观看| 亚洲精品乱码久久久久久久久| 三级影片在线观看欧美日韩一区二区| 麻豆国产91在线播放| 成人av网站大全| 欧美日韩黄色影视| 国产亚洲综合在线| 一区二区成人在线| 久久国产尿小便嘘嘘尿| www.在线成人| 欧美一区日本一区韩国一区| 亚洲国产精品成人综合色在线婷婷| 中文字幕亚洲在| 免费的国产精品| 色噜噜狠狠成人网p站| 精品久久久久久久一区二区蜜臀| 国产精品久久久久一区二区三区 | 精品国产一区二区三区忘忧草| 日本一区二区免费在线观看视频 | 国产精品亚洲第一区在线暖暖韩国| 97久久精品人人做人人爽| 日韩一级片在线观看| 国产精品视频看| 免费人成网站在线观看欧美高清| 国产夫妻精品视频| 91精品综合久久久久久| 亚洲特级片在线| 国产精品69毛片高清亚洲| 欧美乱妇15p| 亚洲欧美aⅴ...| 成人中文字幕电影| 欧美mv日韩mv国产网站app| 一区二区三区视频在线看| 成人午夜视频网站| 欧美不卡激情三级在线观看| 亚洲一区影音先锋| av亚洲精华国产精华| 久久综合av免费| 美国十次综合导航| 欧美日本一道本| 亚洲美女视频一区| 国产不卡免费视频| 久久一区二区三区国产精品| 麻豆国产精品视频| 7777精品伊人久久久大香线蕉超级流畅 | 中文字幕在线观看不卡视频| 蜜桃久久久久久| 91 com成人网| 亚洲另类在线一区| 成人动漫视频在线| 国产精品区一区二区三区| 国产高清无密码一区二区三区| 欧美一区二区三区电影| 亚洲成人一区二区在线观看| 91理论电影在线观看| 亚洲丝袜美腿综合| 91麻豆免费在线观看| 亚洲人成精品久久久久| 99re这里只有精品6| 最近日韩中文字幕|