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

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

?? splitscore.java

?? 本程序是用java語言編寫的數據挖掘分類算法中的決策樹分類方法c4.5程序代碼
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
                splitAndLabelDist + "-->fatal_error");
            //      ASSERT(numerator != Globals.UNDEFINED_REAL);
            gain = numerator / divisor;
            cache.gainRatio = gain;
            if (gain < 0)
                Error.err("SplitScore::get_gain_ratio: negative gain: " +
                gain + "=" + numerator + '/' + divisor + "-->fatal_error");
        }
        if (gain < 0)
            Error.err("SplitScore::get_gain_ratio: negative gain: "+ gain +"-->fatal_error");
        return gain;
    }
    
    /** Returns cache.splitEntropy, first checking to see if it has yet been set.
     * This method updates the cache.
     * @return The split entropy value stored in the cache.
     */
    public double get_split_entropy() {
        valid_cache(); // Percolate validCache to the cache members.
        if (cache.splitEntropy == Globals.UNDEFINED_REAL && has_distribution(true))
            cache.splitEntropy = Entropy.entropy(get_split_dist(), total_weight());
        return cache.splitEntropy;
    }
    
    /** Sets the split score criterion.
     * @param choice The chosen split score criterion.
     * @see #mutualInfo
     * @see #normalizedMutualInfo
     * @see #rainRatio
     * @see #mutualInfoRatio
     * @see #externalScore
     */
    public void set_split_score_criterion(byte choice)
    {splitScoreCriterion = choice; }
    
    /** Clear (delete) distribution array data.
     *
     */
    public void reset() {
        //   delete cache.splitDist;
        cache.splitDist = null;
        //   delete cache.labelDist;
        cache.labelDist = null;
        //   delete splitAndLabelDist;
        splitAndLabelDist = null;
        theExternalScore = Globals.UNDEFINED_REAL;
        
        validCache = false;
        valid_cache();
    }
    
    /** Stores the cache.splitDist array.
     *
     * @param sDist The split distribution array to be cached.
     */
    public void set_split_dist(double[] sDist) {
        valid_cache(); // Percolate validCache to the cache members.
        // Only delete one object's distribution if it doesn't share its
        //   location with the one passed in--otherwise by deleting one, we'd
        //   be deleting both.
        if (cache.splitDist == sDist)
            Error.fatalErr("SplitScore::set_split_dist: got my own pointer");
        //   delete cache.splitDist;
        cache.splitDist = sDist;
        sDist = null;
        //   DBGSLOW(OK());
    }
    
    //public void set_split_and_label_dist(double[][] sAndLDist)
    /** Stores the splitAndLabelDist array.
     * @param sAndLDist The new split and label distribution.
     * @return The old split and label distribution.
     */
    public double[][] set_split_and_label_dist(double[][] sAndLDist) {
        valid_cache(); // Percolate validCache to the cache members.
        // We can't compare for equality and use our results because
        //   the caller's reference may be a reference to an automatic variable,
        //   in which case our delete would screw it up.
        
        // Only delete one object's distribution if it doesn't share its
        //   location with the one passed in--otherwise by deleting one, we'd
        //   be deleting both.
        if (splitAndLabelDist == sAndLDist)
            Error.fatalErr("SplitScore::set_split_and_label_dist: got my own pointer");
        reset();
        splitAndLabelDist = sAndLDist;
        sAndLDist = null;
        return sAndLDist;
    }
    
    private void copy_dist(SplitScore source) {
        if (this != source) {
            reset();
            copy_split_and_label_dist(source);
            validCache = false;
        }
    }
    
    private void copy_split_and_label_dist(SplitScore source) {
        // When the new distribution differs from the old, but the array is
        //   of the same size, don't delete the old splitAndLabelDist array.
        //   Reuse it.
        valid_cache(); // Percolate validCache to the cache members.
        if (splitAndLabelDist != null && source.splitAndLabelDist != null &&
        splitAndLabelDist.length == source.splitAndLabelDist.length) {
            // Keep the splitAndLabelDist, but nothing else in the cache.
            double[][] savedDistribution = splitAndLabelDist;
            splitAndLabelDist = null;
            reset();
            splitAndLabelDist = savedDistribution;
            theExternalScore = Globals.UNDEFINED_REAL;
            splitAndLabelDist = source.get_split_and_label_dist();
        }
        else {
            reset();
            if (source.splitAndLabelDist != null)
                splitAndLabelDist = Matrix.copy(source.get_split_and_label_dist());
        }
    }
    
    /** Set the external score. The score must be non-negative, although we could
     * change it to anything but UNDEFINED_REAL.
     * @param extScore The external score value.
     */
    
    public void set_external_score(double extScore) {
        if (extScore < 0)
            Error.fatalErr("SplitScore::set_external_score: score="+extScore
            +" is negative");
        
        if (!has_distribution(false))
            Error.fatalErr("SplitScore::set_external_score: no distribution");
        MLJ.ASSERT(extScore != Globals.UNDEFINED_REAL,
        "SplitScore.set_external_score: extScore == Globals.UNDEFINED_REAL.");
        theExternalScore = extScore;
    }
    
    /** Checks if an external score has been set.
     * @return TRUE if the external score is set, FALSE otherwise.
     */
    public boolean has_external_score(){return theExternalScore != Globals.UNDEFINED_REAL;}
    
    
    /** Produces formatted display of contents of object. This method updates the
     * cache. Does not abort on unset data.
     */
    public void display() {
        display(Globals.Mcout,DisplayPref.defaultDisplayPref);
    }
    
    /** Produces formatted display of contents of object. This method updates the
     * cache. Does not abort on unset data. This method updates the cache.
     * @param stream The Writer to be displayed to.
     */
    public void display(Writer stream) {
        display(stream,DisplayPref.defaultDisplayPref);
    }
    
    
    /** Produces formatted display of contents of object. This method updates the
     * cache. Does not abort on unset data. This method updates the cache.
     * @param stream The Writer to be displayed to.
     * @param dp The display preferences.
     */
    public void display(Writer stream, DisplayPref dp) {
        String endl = "\n";
        String INDENT = "  ";
        String UNSET = "unset";
        double val;
        try{
            if (dp.preference_type() == DisplayPref.ASCIIDisplay) {
                valid_cache();
                stream.write("SplitScore:" + endl);
                stream.write(INDENT + "split score criterion = "
                + splitScoreCriterionEnum[get_split_score_criterion()] + endl);
                if (!has_distribution(false))
                    stream.write(INDENT + "has no cache data" + endl);
                else {
                    stream.write(INDENT + "total weight = ");
                    if (Globals.UNDEFINED_REAL == (val = total_weight()))
                        stream.write(UNSET + endl);
                    else
                        stream.write(val + endl);
                    if (num_splits() > 0)
                        stream.write(INDENT + "number of splitting values = "
                        + num_splits() + endl);
                    stream.write(INDENT + "entropy = ");
                    if (Globals.UNDEFINED_REAL == (val = get_entropy()))
                        stream.write(UNSET + endl);
                    else
                        stream.write(val + endl);
                    stream.write(INDENT + "split entropy = ");
                    if (Globals.UNDEFINED_REAL == (val = get_split_entropy()))
                        stream.write(UNSET + endl);
                    else
                        stream.write(val + endl);
                    stream.write(INDENT + "conditional entropy = ");
                    if (Globals.UNDEFINED_REAL == (val = get_cond_entropy()))
                        stream.write(UNSET + endl);
                    else
                        stream.write(val + endl);
                    stream.write(INDENT + "mutual information = "
                    + get_mutual_info(false) + endl);
                    stream.write(INDENT + "normalized mutual information = "
                    + get_mutual_info(true) + endl);
                    stream.write(INDENT + "gain ratio = ");
                    if (Globals.UNDEFINED_REAL == (val = get_gain_ratio()))
                        stream.write(UNSET + endl);
                    else
                        stream.write(val + endl);
                    if (has_external_score())
                        stream.write(INDENT + "external score = " + get_external_score()
                        + endl);
                    // Choose not to stream the arrays at low log levels.
                    // Note that we use stream, not get_log_stream() here
                    //   because they should go to the same stream.
                    int LEVEL = 4;
                    if (has_distribution(false)) {
                        if (get_log_level() >= LEVEL) stream.write(INDENT + "splitAndLabelDist = "
                        + get_split_and_label_dist() + endl);
                        if (get_log_level() >= LEVEL) stream.write(INDENT + "labelDist = "
                        + get_label_dist() + endl);
                        if (get_log_level() >= LEVEL) stream.write(INDENT + "splitDist = "
                        + get_split_dist() + endl);
                    }
                }
            }
        }catch(IOException e){e.printStackTrace(); System.exit(1);}
    }
    
    /** Assigns the given SplitScore data to this SplitScore.
     * @param rhs The SplitScore to be copied.
     * @return This SplitScore after assignment.
     */
    public SplitScore assign(SplitScore rhs) {
        if (this != rhs) {
            copy_dist(rhs);
            splitScoreCriterion = rhs.splitScoreCriterion;
            theExternalScore = rhs.theExternalScore;
        }
        return (this);
    }
    
    /** Returns the split and label distribution array and releases ownership.
     *
     * @return The split and label distribution.
     */
    public double[][] release_split_and_label_dist() {
        double[][] distribution = splitAndLabelDist;
        if (distribution == null)
            Error.fatalErr("SplitScore::release_split_and_label_dist: there is no "
            +"distribution to release");
        splitAndLabelDist = null;
        reset();
        return distribution;
    }
    
    /** Returns the label distribution array and releases ownership.
     * @return The label distribution.
     */
    public double[] release_label_dist() {
        get_label_dist();
        double[] distribution = cache.labelDist;
        if (distribution == null)
            Error.fatalErr("SplitScore::release_label_dist: there is no "
            +"label distribution to release");
        cache.labelDist = null;
        return distribution;
    }
    
    /** Returns the split distribution array and releases ownership.
     * @return The split distribution.
     */
    public double[] release_split_dist() {
        get_split_dist();
        double[] distribution = cache.splitDist;
        if (distribution == null)
            Error.fatalErr("SplitScore::release_split_dist: there is no "
            +"split distribution to release");
        cache.splitDist = null;
        return distribution;
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人在线网站| 久久久久久久综合色一本| 欧美大片在线观看一区| 国产精品久久三区| 久久精品av麻豆的观看方式| 色综合婷婷久久| 久久精品一区二区三区不卡| 亚洲成人黄色小说| 99re这里只有精品首页| 337p日本欧洲亚洲大胆色噜噜| 亚洲综合精品久久| 成a人片国产精品| 久久欧美中文字幕| 日韩不卡一区二区三区| 欧美亚洲禁片免费| 亚洲四区在线观看| 国产aⅴ综合色| 久久综合九色欧美综合狠狠 | 欧美日本精品一区二区三区| 欧美国产精品一区二区| 精品亚洲国内自在自线福利| 91精品婷婷国产综合久久竹菊| 亚洲精品精品亚洲| 色婷婷一区二区| 国产精品第五页| 99精品欧美一区二区三区小说 | 欧美一区二区三区在线电影 | 久久超碰97中文字幕| 在线播放一区二区三区| 亚洲成人av一区| 欧美精品99久久久**| 日韩专区中文字幕一区二区| 欧美精选在线播放| 久久精品国产免费看久久精品| 欧美精品久久一区二区三区| 亚洲成人av电影| 91精选在线观看| 精品午夜久久福利影院| 久久免费偷拍视频| 成人免费视频视频在线观看免费| 国产精品蜜臀在线观看| 一本久久a久久精品亚洲| 一区二区三区不卡在线观看| 欧美性受极品xxxx喷水| 日本三级韩国三级欧美三级| 欧美精品一区二区三区在线| 国产麻豆视频精品| 国产精品午夜电影| 色视频成人在线观看免| 丝袜美腿高跟呻吟高潮一区| 精品国精品国产| 丰满岳乱妇一区二区三区| 亚洲欧洲韩国日本视频| 欧美又粗又大又爽| 麻豆精品视频在线| 欧美精彩视频一区二区三区| 91麻豆123| 日韩成人精品在线| 国产精品久久久久永久免费观看| 色婷婷国产精品| 麻豆成人免费电影| 国产精品视频看| 7777女厕盗摄久久久| 国产最新精品精品你懂的| 中文字幕综合网| 91精品国产全国免费观看| 国产美女娇喘av呻吟久久| 1区2区3区精品视频| 91麻豆精品国产无毒不卡在线观看| 国产精品自拍av| 亚洲国产综合人成综合网站| 久久精品一区二区三区不卡| 欧美日韩中文字幕一区二区| 久久99国产精品麻豆| 亚洲人成在线观看一区二区| 日韩一级成人av| 91美女在线视频| 国产乱人伦精品一区二区在线观看 | 亚洲精品免费在线观看| 日韩免费视频一区二区| 91九色最新地址| 紧缚捆绑精品一区二区| 亚洲线精品一区二区三区| 久久影音资源网| 91精品国产美女浴室洗澡无遮挡| 成人黄页毛片网站| 麻豆精品一区二区| 午夜天堂影视香蕉久久| 中文字幕欧美一| 国产亚洲精品资源在线26u| 欧美精品xxxxbbbb| 色乱码一区二区三区88| 国产一区二区精品在线观看| 蜜臀91精品一区二区三区| 一区二区三区不卡在线观看 | 久久久久久久久久电影| 777欧美精品| 欧美色精品在线视频| 色屁屁一区二区| av不卡在线观看| 国v精品久久久网| 韩国三级中文字幕hd久久精品| 青青草伊人久久| 午夜精品久久久久久久久久久 | 1024国产精品| 国产精品视频一区二区三区不卡| 精品国产sm最大网站| 日韩三级高清在线| 欧美一区二区私人影院日本| 欧美另类videos死尸| 欧美三级电影网站| 国产乱理伦片在线观看夜一区| 欧美电影免费观看高清完整版在线观看 | 免费一区二区视频| 亚洲一二三区在线观看| 一区二区国产盗摄色噜噜| 亚洲日本韩国一区| 亚洲欧美日韩中文字幕一区二区三区| 中文字幕日韩精品一区| 国产精品亲子乱子伦xxxx裸| 国产精品免费看片| 一区二区在线观看av| 一区二区三区久久久| 亚洲综合激情小说| 日韩高清在线不卡| 激情综合一区二区三区| 国产麻豆视频一区二区| 成人精品小蝌蚪| 在线视频一区二区免费| 欧美日韩成人一区二区| 日韩精品一区二区三区蜜臀| 精品99一区二区| 国产偷国产偷精品高清尤物| 一区在线播放视频| 亚洲国产日韩a在线播放性色| 日本最新不卡在线| 国产福利一区二区三区视频| 97久久久精品综合88久久| 欧美日韩大陆在线| 久久夜色精品一区| 国产精品久久毛片av大全日韩| 亚洲女同女同女同女同女同69| 日韩制服丝袜av| 岛国av在线一区| 在线电影一区二区三区| 国产亚洲精品bt天堂精选| 一区二区三区丝袜| 美女视频黄频大全不卡视频在线播放| 国产ts人妖一区二区| 色噜噜狠狠色综合欧洲selulu| 日韩一区二区三区视频| 国产女主播一区| 奇米影视一区二区三区小说| 国产福利一区二区三区视频 | va亚洲va日韩不卡在线观看| 欧美男人的天堂一二区| 亚洲国产精品99久久久久久久久| 亚洲激情六月丁香| 国产一区二区三区黄视频 | 久久er精品视频| 91啪亚洲精品| 欧美精品一区二区久久婷婷| 亚洲电影你懂得| 不卡视频一二三| 91麻豆精品国产91久久久资源速度| 国产精品三级在线观看| 精品一区二区三区日韩| 欧洲精品中文字幕| 国产精品无圣光一区二区| 美女网站视频久久| 欧美午夜寂寞影院| 中文字幕永久在线不卡| 久久91精品久久久久久秒播 | av中文字幕亚洲| 日韩一区二区免费在线电影| 亚洲欧美经典视频| 成人av资源网站| 国产日产亚洲精品系列| 日本美女视频一区二区| 欧美日韩视频专区在线播放| 亚洲欧洲www| 成人性生交大片免费| 久久精品无码一区二区三区| 麻豆精品在线观看| 日韩欧美中文一区| 午夜精品久久久久| 在线观看日韩精品| 亚洲自拍偷拍图区| 91原创在线视频| 国产精品电影一区二区| 成人的网站免费观看| 亚洲欧洲av另类| 99久久婷婷国产综合精品| 欧美经典一区二区| 成人精品视频一区二区三区尤物| 欧美激情一区在线观看| 国产成人免费高清| 亚洲国产精品精华液ab| 91在线观看成人| 亚洲午夜免费电影|