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

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

?? instance.java

?? 此編碼是一個數據挖掘的決策樹各種算法。以作為入門提示
?? 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一区二区三区免费野_久草精品视频
亚洲一区av在线| 国产一区二区三区在线看麻豆| 国产精品一线二线三线| 久久久久久久久99精品| 国产精品自拍av| 国产精品每日更新| 色综合久久久久综合| 亚洲综合色自拍一区| 4438成人网| 国产精品一线二线三线| 国产精品国产三级国产三级人妇| 99久久精品免费看| 亚洲成av人影院在线观看网| 日韩三级免费观看| 成人激情免费电影网址| 一区二区三区视频在线观看| 欧美一区二区二区| 国产精品18久久久| 玉足女爽爽91| 欧美不卡123| 99精品国产热久久91蜜凸| 亚洲不卡av一区二区三区| 欧美xxxx老人做受| 91免费在线视频观看| 日韩二区在线观看| 中文字幕国产一区二区| 欧美日韩久久久| 国产一区二区三区在线观看精品 | 一级做a爱片久久| 9191成人精品久久| 欧美成人精品3d动漫h| 成人免费高清在线| 免费高清不卡av| 成人欧美一区二区三区黑人麻豆| 6080午夜不卡| 99精品在线免费| 热久久一区二区| 一区二区三区免费在线观看| 日韩午夜激情视频| 91女神在线视频| 东方欧美亚洲色图在线| 日韩vs国产vs欧美| 亚洲猫色日本管| 国产亚洲精品aa午夜观看| 国产91精品久久久久久久网曝门| 成人午夜短视频| 亚洲人成在线播放网站岛国| 中文字幕欧美国产| 亚洲精品国产精品乱码不99 | 欧美日产在线观看| 亚洲欧美另类在线| 在线免费观看一区| 亚洲精品精品亚洲| 欧美一区二区精美| xnxx国产精品| 亚洲永久精品国产| 国产乱码精品1区2区3区| 日本一区二区免费在线观看视频 | 久久久久久久久久久久久久久99 | 日韩精品中文字幕一区二区三区 | 国产一区二区精品久久| 色偷偷久久一区二区三区| 1区2区3区精品视频| 欧美国产一区在线| 激情文学综合插| 国产精品久久国产精麻豆99网站| 欧美三级电影网站| 成人aaaa免费全部观看| 精品一区二区三区免费观看| 亚洲精品免费在线观看| 久久精品人人做人人爽97| 欧美成人免费网站| 欧美日韩国产一级片| 在线观看一区日韩| 99视频一区二区| 不卡av电影在线播放| 国产美女av一区二区三区| 精品一区二区日韩| 美脚の诱脚舐め脚责91 | 日本在线播放一区二区三区| 最新国产の精品合集bt伙计| 欧美v日韩v国产v| 欧美一区二区三区在线| 在线观看视频一区二区| jlzzjlzz欧美大全| 久久综合久久综合久久| 99久久99久久精品免费观看| 亚洲综合一区二区| 3d成人h动漫网站入口| 国产高清视频一区| 日韩精品一二三区| 色狠狠综合天天综合综合| 亚洲国产精品传媒在线观看| 国产·精品毛片| 国产精品―色哟哟| 国产麻豆午夜三级精品| 国产传媒久久文化传媒| 91在线观看地址| 91久久奴性调教| 国产白丝网站精品污在线入口| 高清shemale亚洲人妖| 色综合天天综合网天天狠天天| 欧美国产精品久久| 午夜视频在线观看一区二区 | 一区二区三区中文字幕精品精品| 国产精品综合av一区二区国产馆| 国产精品国产三级国产aⅴ中文| 色综合咪咪久久| 欧美中文字幕一区| 欧美系列亚洲系列| 色88888久久久久久影院野外| 免费高清在线视频一区·| 国产91丝袜在线18| 欧美一卡二卡三卡四卡| 亚洲人成网站在线| 国产精品美女久久久久久2018| 成人免费在线播放视频| 视频一区国产视频| 国产一区二区三区最好精华液| 亚洲国产精品一区二区www| 粉嫩aⅴ一区二区三区四区五区| 成人国产视频在线观看| 国产成人精品影视| 国产激情偷乱视频一区二区三区 | 精品国产sm最大网站免费看| 国产精品午夜春色av| 亚洲一区二区欧美日韩| 青青草原综合久久大伊人精品优势| 一区二区三区在线视频播放| 午夜婷婷国产麻豆精品| 美女www一区二区| av电影在线不卡| 欧美日韩综合不卡| 欧美日韩高清在线| 亚洲天堂久久久久久久| 国产日韩v精品一区二区| 欧美韩国日本不卡| 国产精品主播直播| 91精品国产综合久久久久久久| 欧美性色欧美a在线播放| 精品奇米国产一区二区三区| 亚洲福利视频一区| 青青草国产精品亚洲专区无| 日本道精品一区二区三区| 国产精品久久看| 欧美日韩专区在线| 精品国产乱码久久久久久闺蜜| 一区二区三区在线看| 激情文学综合网| 色噜噜久久综合| 亚洲成人动漫在线免费观看| 国产综合久久久久久鬼色 | 一区二区成人在线观看| 国产69精品久久777的优势| 91国偷自产一区二区三区成为亚洲经典| 精品久久免费看| 亚洲国产wwwccc36天堂| 99re这里只有精品6| 欧美日韩午夜在线视频| 亚洲精品免费一二三区| 久久er精品视频| 欧美一区二区三区免费在线看| 国产精品美女久久久久av爽李琼| 蜜臀精品久久久久久蜜臀| eeuss鲁片一区二区三区| 亚洲精品在线三区| 亚洲国产毛片aaaaa无费看| 丁香六月久久综合狠狠色| 国产亚洲成年网址在线观看| 久久成人免费网| 精品久久久久久综合日本欧美| 亚洲一区二区在线免费看| 欧美亚洲国产一区二区三区va | 欧美美女网站色| 国产乱码精品一区二区三区五月婷| 日韩三级视频中文字幕| 激情欧美一区二区三区在线观看| 欧美一级精品在线| 久久精品噜噜噜成人88aⅴ| 精品国产精品一区二区夜夜嗨| 国产精品亚洲一区二区三区在线 | 欧美一区二区三区白人| 国产精品乱码妇女bbbb| 麻豆91精品91久久久的内涵| 欧美视频第二页| 性久久久久久久久久久久| 在线精品国精品国产尤物884a| 天天综合色天天综合色h| 欧美日韩国产另类不卡| 日韩激情视频网站| 国产在线一区观看| 日韩美女视频一区| 国产一区二区三区四区五区入口 | 色一情一乱一乱一91av| **性色生活片久久毛片| 99在线精品观看| 亚洲一区二区黄色| 色88888久久久久久影院按摩| 亚洲国产综合色| 日韩精品资源二区在线|