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

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

?? instance.java

?? 本代碼是用java語言編寫的基于決策樹c4.5算法的數據挖掘程序
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
                    rtrn = rtrn + separator;
            }
            else{
                //System.out.println("Values.length = " + values.length);
                //System.out.println("attrNum = "+attrNum);
                if(values[attrNum] == null)System.out.println("Error");
                String data = ai.attrValue_to_string(values[attrNum]);
                if(ai.can_cast_to_nominal())// && protectChars)
                    ;// data = protect_chars(data);
                rtrn = rtrn + data;
                if(data.equals("")) rtrn = rtrn + "?";
                if(attrNum < (schema.num_attr()-1))
                    rtrn = rtrn + separator;
                
            }
        }
        if(is_labelled()){
            if(schema.num_attr() > 0)
                rtrn = rtrn + ", ";
            AttrInfo ai = schema.label_info();
            String data = ai.attrValue_to_string(labelValue);
            //if(protectChars)
            //   data = protect_chars(data);
            rtrn = rtrn + data;
        }
        rtrn = rtrn + "\n";
        return(rtrn);
        
    }
    
    /** Returns the information about the attribute specified.
     * @return The information about the attribute.
     * @param attrNum	The index of the attribute specified.
     */
    public AttrInfo attr_info(int attrNum) {
        return schema.attr_info(attrNum);
    }
    
    /** Checks if this Instance is equal to the specified Instance. Compares the
     * attributes values, the weight, and the label of this Instance.
     * @return TRUE if these Instances are equal, FALSE otherwise.
     * @param i_instance	The Instance to be compared to.
     */
    public boolean equals(Instance i_instance) {
        return equal(i_instance,true,true,false);
    }
    
    /** Compares this Instance to the specified Instance. This function may
     * optionally compare the label and the weight as part of this process. Setting
     * fatalOnFalse will cause equal() to abort with a clear error message
     * if the equality test fails.
     * @return TRUE if these Instances are equal, FALSE otherwise.
     * @param instance		The Instance to be compared to.
     * @param compLabel		TRUE if labels are to be compared, FALSE otherwise.
     * @param compWeight		TRUE if weights are to be compared, FALSE otherwise.
     * @param fatalOnFalse	TRUE if an Error message should be displayed if
     * the Instances are not equal, FALSE otherwise.
     */
    boolean equal(Instance instance,
    boolean compLabel, boolean compWeight,
    boolean fatalOnFalse) {
        // if one instance is labelled and the other is not AND we're
        // comparing labels, its a mismatch.
        if( compLabel && (is_labelled() != instance.is_labelled())) {
            if (fatalOnFalse) {
                Error.fatalErr("Instance::equal: equalilty failed (only one of the"
                +"two instances has label).");
            }
            else
                return false;
        }
        
        // compare labels if compLabel is set
        else if(compLabel && is_labelled()) {
            //      DBGSLOW(schema.label_info().equal(instance.get_schema().label_info(),
            //					TRUE));
            if(!schema.label_info().equal_value(labelValue,instance.get_label())) {
                if(fatalOnFalse) {
                    Error.fatalErr("Instance::equal: equality failed (label values "
                    +"differ).");
                }
                return false;
            }
        }
        
        // compare weights if compWeight is set
        if(compWeight) {
            if(!MLJ.approx_equal((float)get_weight(),
            (float)(instance.get_weight()))) {
                if(fatalOnFalse) {
                    Error.fatalErr("Instance::equal: equality failed (weights do not match: "
                    +get_weight() +" vs " +instance.get_weight()
                    +").");
                }
                return false;
            }
        }
        
        // check schemas and number of values (DBG only)
        //   DBGSLOW(get_schema().equal_no_label(instance.get_schema(), TRUE));
        //   DBG(if (instance.values.size() != values.size())
        //       err << "Instance::equal: number of values in instance "
        //       "do not match.  class=" << values.size()
        //       << " and rhs=" << instance.values.size() << fatal_error);
        
        // compare attribute values
        for (int i = 0; i < schema.num_attr(); i++) {
            if (!attr_info(i).equal_value( values[i], instance.values[i] )) {
                if( fatalOnFalse ) {
                    Error.fatalErr("Instance::equal: equality failed (differed on "
                    +attr_info(i).name() +").");
                }
                return false;
            }
        }
        
        // comparison succeeded
        return true;
    }
    
    /** Returns a String representation of the Instance.
     * @param displayWeight TRUE if the Instance weight is to be displayed, FALSE otherwise.
     * @param normalizeReals TRUE if the real values in the Instance are to be normalized, FALSE otherwise.
     * @return A String representation of the Instance.
     */
    public String out(boolean displayWeight, boolean normalizeReals) {
        String rtrn = new String();
        rtrn = rtrn + display_unlabelled_out(displayWeight, normalizeReals);
        if(is_labelled()){
            if(schema.num_attr() > 0)
                rtrn = rtrn + ", ";
            AttrInfo ai = schema.label_info();
            String data = ai.attrValue_to_string(labelValue);
            //if(protectChars)
            //   data = protect_chars(data);
            rtrn = rtrn + data;
        }
        rtrn = rtrn + "\n";
        return rtrn;
    }
    
    /** Returns a String representation of the Instance.
     * @param displayWeight TRUE if the Instance weight is to be displayed, FALSE otherwise.
     * @param normalizeReal TRUE if the real values in the Instance are to be normalized, FALSE otherwise.
     * @return A String representation of the Instance.
     */
    public String display_unlabelled_out(boolean displayWeight, boolean normalizeReal) {
        String rtrn = new String();
        String separator =  new String(", ");
        if(displayWeight)
            rtrn = rtrn + (weight+separator);
        for(int attrNum = 0;attrNum<schema.num_attr();attrNum++){
            AttrInfo ai = schema.attr_info(attrNum);
            if(normalizeReal && ai.can_cast_to_real()){
                RealAttrInfo rai = ai.cast_to_real();
                if(rai.is_unknown(values[attrNum]))
                    rtrn = rtrn + AttrInfo.UNKNOWN_VAL_STR;
                else
                    rtrn = rtrn + rai.normalized_value(values[attrNum]);
                if(attrNum < schema.num_attr() -1)
                    rtrn = rtrn + separator;
            }
            else{
                //System.out.println("Values.length = " + values.length);
                //System.out.println("attrNum = "+attrNum);
                if(values[attrNum] == null)System.out.println("Error");
                String data = ai.attrValue_to_string(values[attrNum]);
                if(ai.can_cast_to_nominal())// && protectChars)
                    ;// data = protect_chars(data);
                rtrn = rtrn + data;
                if((attrNum < (schema.num_attr()-1))&&(!(data.equals(""))))
                    rtrn = rtrn + separator;
            }
        }
        return rtrn;
    }
    
    /** Returns the AttrValue at the specified index number.
     * @return The AttrValue at the specified index.
     * @param index The index specified.
     */
    public AttrValue index(int index) {
        return values[index];
    }
    
    /** Copies the supplied Instance object into this Instance object.
     * @param other The Instance object to be copied.
     * @throws CloneNotSupportedException if the cloning process for contained data members encounters a
     * CloneNotSupportedException.
     */
    public void copy(Instance other) throws CloneNotSupportedException{
        values = new AttrValue[other.schema.num_attr()];
        for(int i = 0; i < values.length; values[i++] = new AttrValue());
        schema = other.schema;
        refCount = other.refCount;
        set_weight(weight);
        set_label((AttrValue)labelValue.clone());
        for(int i=0;i<values.length;i++)
            values[i] = (AttrValue)other.get_value(i).clone();
    }
    
    /** Remove an Attribute from an Instance. When doing many projections, it is more
     * efficient to supply a Schema with the deleted attribute.
     * @param attrNum The number of the attribute to be removed from this InstanceObject.
     * @param schemaWithDelAttr Schema with the attribute deleted.
     * @return The modified Instance.
     */
    public Instance remove_attr(int attrNum, Schema schemaWithDelAttr) {
        if ( attrNum < 0 || attrNum >= num_attr() )
            Error.fatalErr("Instance.remove_attr(int,Schema): illegal attrNum \n"
            +attrNum+" is passed but the proper range is \n"+" 0 to "+(num_attr() - 1)
            +".");
        
        Instance instance = new Instance(schemaWithDelAttr);
        for (int i = 0; i < schema.num_attr(); i++)
            if (i != attrNum){
                index(i - ((i > attrNum)?1:0)).copy(index(i));
            }
        if (schema.is_labelled()) // both are labelled becauseof
            // equal_except_del_attr
            instance.set_label(get_label());
        return instance;
    }
    
    /** Remove an Attribute from an Instance. When doing many projections, it is more
     * efficient to supply a Schema with the deleted attribute.
     * @param attrNum The number of the attribute to be removed from this InstanceObject.
     * @return The modified Instance.
     */
    public Instance remove_attr(int attrNum) {
        if ( attrNum < 0 || attrNum >= num_attr() )
            Error.fatalErr("Instance.remove_attr(int): illegal attrNum \n"
            +attrNum+" is passed but the proper range is \n"+" 0 to "+(num_attr() - 1)
            +".");
        
        Schema schemaNew = schema.remove_attr(attrNum);
        return remove_attr(attrNum, schemaNew);
    }
    
    
    /** Returns the number of values for the specified attribute.
     * @param attrNum The number of the attribute for which the number of values is requested.
     * @return The number of attribute values.
     */
    public int num_attr_values(int attrNum){
        return schema.num_attr_values(attrNum);
    }
    
    /** Returns the number of possible label values in the Schema of this Instance.
     * @return The number of possible label values.
     */
    public int num_label_values() {
        return nominal_label_info().num_values();
    }
    
    /** Returns the information on the label attribute.
     * @return Information on the label attribute.
     */
    public NominalAttrInfo nominal_label_info() {
        return label_info().cast_to_nominal();
    }
    
    /** Returns the attribute name.
     * @param attrNum The number of the attribute.
     * @return The name of the attribute.
     */
    public String attr_name(int attrNum){
        return schema.attr_name(attrNum);
    }
    
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆91在线看| 亚洲视频图片小说| 蜜桃av一区二区| 日韩欧美一级精品久久| 久久99最新地址| 日本一区二区高清| www.日韩在线| 午夜视频一区在线观看| 日韩欧美电影在线| 国产福利一区二区三区视频在线 | 男男视频亚洲欧美| 欧美一级一区二区| 国产成人亚洲综合色影视| 中文字幕在线一区| 欧美性猛片aaaaaaa做受| 久久精品理论片| 国产精品丝袜91| 欧美三区在线视频| 国产在线麻豆精品观看| 亚洲日本欧美天堂| 欧美日本高清视频在线观看| 国产自产高清不卡| 亚洲码国产岛国毛片在线| 欧美乱妇一区二区三区不卡视频| 寂寞少妇一区二区三区| 中文字幕日韩一区| 91精品国产综合久久久久| 国产在线一区观看| 亚洲在线视频网站| 精品少妇一区二区三区| 99久久99久久综合| 日韩av成人高清| 国产精品大尺度| 欧美电影一区二区| 成人免费精品视频| 日本不卡一区二区| 亚洲图片另类小说| 欧美成人在线直播| 色综合久久久久网| 精品视频在线免费观看| 韩国一区二区视频| 五月天激情小说综合| 中文av一区特黄| 日韩欧美美女一区二区三区| 色婷婷av久久久久久久| 激情综合网激情| 日韩中文字幕不卡| 亚洲人成精品久久久久久| 337p粉嫩大胆噜噜噜噜噜91av| 91久久香蕉国产日韩欧美9色| 国产尤物一区二区在线| 首页国产丝袜综合| 亚洲另类在线一区| 国产精品麻豆久久久| 欧美sm美女调教| 91精品国产91久久久久久最新毛片 | 中文字幕日韩欧美一区二区三区| 日韩一级大片在线| 欧美日韩一二三区| 91国偷自产一区二区三区成为亚洲经典 | 欧美电影免费观看高清完整版在| 在线观看精品一区| 91老师国产黑色丝袜在线| 风间由美中文字幕在线看视频国产欧美| 日本成人在线网站| 亚洲国产精品欧美一二99| 亚洲三级在线观看| 久久久国际精品| 欧美成人aa大片| 日韩美女主播在线视频一区二区三区 | 亚洲一区二区欧美激情| 亚洲免费在线视频一区 二区| 国产精品久久久久久久久久久免费看 | 国产盗摄一区二区| 国产精一品亚洲二区在线视频| 日韩电影在线看| 日韩高清不卡一区二区三区| 日本伊人色综合网| 水蜜桃久久夜色精品一区的特点| 亚洲成人免费电影| 天天综合色天天| 日韩avvvv在线播放| 日产精品久久久久久久性色| 青青草精品视频| 久久精工是国产品牌吗| 久久精品国内一区二区三区 | 国产精品亚洲专一区二区三区| 国产一区二区三区在线看麻豆| 国产综合久久久久影院| 国产99久久精品| 91视频xxxx| 91精品国产综合久久小美女| 欧美第一区第二区| 久久久综合激的五月天| 国产欧美精品在线观看| 国产精品精品国产色婷婷| 国产精品 欧美精品| 极品少妇xxxx精品少妇| 亚洲欧洲制服丝袜| 99视频精品免费视频| 综合色天天鬼久久鬼色| 日本一区二区在线不卡| 精品福利一区二区三区| 国产精品久久久久三级| 亚洲欧美另类久久久精品2019| 欧美久久免费观看| 久久一二三国产| 不卡欧美aaaaa| 毛片av一区二区三区| 国产精品99久久不卡二区| 99国产精品国产精品毛片| 欧美三级欧美一级| 久久久亚洲精品石原莉奈| 亚洲丝袜自拍清纯另类| 日韩精品1区2区3区| 国产一区三区三区| 91久久线看在观草草青青| 精品美女一区二区| 亚洲精品免费看| 久久黄色级2电影| 99re成人在线| 久久一区二区视频| 亚洲午夜精品久久久久久久久| 国产一区二区三区黄视频| 欧美亚洲动漫另类| 国产亚洲va综合人人澡精品 | 成人黄色国产精品网站大全在线免费观看 | 午夜视频在线观看一区二区| 欧美老女人第四色| 国产丝袜欧美中文另类| 亚洲1区2区3区4区| 成人国产电影网| 欧美电视剧在线看免费| 一区二区成人在线观看| 国产成人aaa| 日韩一区二区免费视频| 亚洲最色的网站| 成人动漫视频在线| 欧美成人综合网站| 三级一区在线视频先锋| 91影院在线观看| 国产欧美视频一区二区三区| 日本欧美一区二区在线观看| 色综合天天综合网天天狠天天| 日本一区二区免费在线观看视频 | 日韩欧美国产午夜精品| 亚洲精品成人天堂一二三| 处破女av一区二区| 欧美变态凌虐bdsm| 琪琪久久久久日韩精品| 欧美日韩免费在线视频| 日韩理论在线观看| 不卡电影一区二区三区| 久久综合色之久久综合| 蜜臀久久久久久久| 欧美一区二区在线不卡| 亚洲一区国产视频| 在线观看亚洲精品视频| 中文字幕五月欧美| 粉嫩欧美一区二区三区高清影视| 日韩精品中午字幕| 久久国产麻豆精品| 日韩视频免费观看高清完整版在线观看 | 亚洲欧洲美洲综合色网| 激情综合五月婷婷| 精品国内片67194| 狠狠色综合日日| 久久亚洲精品国产精品紫薇| 国内不卡的二区三区中文字幕 | 免费成人在线视频观看| 久久精品99国产精品| 97精品视频在线观看自产线路二| 欧美日韩国产一区| 欧美日韩一区成人| 日韩欧美在线观看一区二区三区| 久久爱另类一区二区小说| 亚洲天堂2016| 亚洲一二三专区| 中文字幕在线一区二区三区| 国产精品蜜臀在线观看| 欧美三级蜜桃2在线观看| 欧美日韩极品在线观看一区| 最新热久久免费视频| 日本欧美在线看| 久久一留热品黄| 97久久精品人人爽人人爽蜜臀| 亚洲人成7777| 91精品国产福利| 国产精品1区2区3区在线观看| 国产精品久久久久婷婷| 91蝌蚪国产九色| 性做久久久久久免费观看 | 国产精品三级久久久久三级| 91网站最新地址| 日韩国产欧美在线观看| 337p日本欧洲亚洲大胆精品| 91视频免费观看| 另类小说欧美激情| 国产精品久久久久久久第一福利| 欧美性猛交xxxxxx富婆|