亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
亚洲欧洲制服丝袜| 欧美日韩视频不卡| 国产欧美中文在线| 国产大片一区二区| 久久久99久久精品欧美| 高潮精品一区videoshd| 国产乱子伦一区二区三区国色天香 | 色婷婷综合久久久中文字幕| 中文字幕一区二区在线观看| 91麻豆精品秘密| 亚洲国产日韩综合久久精品| 777久久久精品| 久久精品999| 国产欧美一二三区| 色中色一区二区| 日本不卡一二三| 久久婷婷成人综合色| 99精品久久只有精品| 一区二区欧美视频| 欧美xingq一区二区| 国v精品久久久网| 一区二区三区日韩精品视频| 777色狠狠一区二区三区| 国产一区福利在线| 成人欧美一区二区三区白人| 欧美日韩在线三级| 国产精品一区在线观看你懂的| 国产精品女人毛片| 7777精品久久久大香线蕉| 国产精品一区在线观看乱码| 亚洲宅男天堂在线观看无病毒| 日韩一区二区影院| 色伊人久久综合中文字幕| 日本欧美肥老太交大片| 国产精品久久久久影院亚瑟| 日韩三级.com| 色婷婷久久久亚洲一区二区三区 | 亚洲一卡二卡三卡四卡五卡| 日韩欧美电影一区| 91成人网在线| 国产大陆亚洲精品国产| 亚洲成人资源在线| 中文字幕不卡的av| 日韩亚洲电影在线| 91福利精品视频| 国产91精品一区二区麻豆亚洲| 亚洲地区一二三色| 亚洲欧洲日韩女同| 337p粉嫩大胆噜噜噜噜噜91av| 欧洲国产伦久久久久久久| 国产成人av电影在线观看| 日韩av一区二区三区四区| 椎名由奈av一区二区三区| 久久综合色一综合色88| 欧美色综合影院| 99视频精品在线| 国产风韵犹存在线视精品| 裸体在线国模精品偷拍| 亚洲宅男天堂在线观看无病毒| 国产精品日韩成人| 久久精品视频一区二区| 日韩无一区二区| 欧美精品久久99久久在免费线 | 91亚洲精华国产精华精华液| 狠狠色狠狠色综合| 久久精品国产亚洲a| 天天色图综合网| 亚洲妇女屁股眼交7| 最新国产の精品合集bt伙计| 国产视频一区二区在线| 精品sm在线观看| 日韩免费看网站| 日韩一二三区不卡| 日韩女优毛片在线| 日韩精品一区二区三区在线播放| 91精品国产综合久久国产大片| 欧美精选一区二区| 777午夜精品免费视频| 日韩一区二区三区观看| 欧美剧在线免费观看网站| 欧美日韩一区三区四区| 91免费国产在线| 日本国产一区二区| 欧美性色黄大片| 7777精品伊人久久久大香线蕉超级流畅 | 亚洲卡通动漫在线| 亚洲男人天堂av| 亚洲精品国产精品乱码不99| 亚洲精品乱码久久久久| 一区二区三区波多野结衣在线观看| 亚洲人午夜精品天堂一二香蕉| 亚洲啪啪综合av一区二区三区| 亚洲欧美日韩国产另类专区| 一级女性全黄久久生活片免费| 亚洲自拍偷拍av| 日本色综合中文字幕| 久久精品国产99| 国产精品18久久久久久久久久久久| 国产高清不卡一区二区| 91在线精品一区二区| 欧美曰成人黄网| 欧美一区二区三区婷婷月色| 精品国产乱子伦一区| 国产精品午夜在线| 亚洲一区二区三区视频在线播放 | 91在线云播放| 欧美怡红院视频| 日韩欧美国产精品| 国产精品乱人伦| 亚洲自拍偷拍网站| 另类成人小视频在线| 成人午夜免费av| 欧美无乱码久久久免费午夜一区| 91精品国产高清一区二区三区| 久久香蕉国产线看观看99| 自拍偷拍国产亚洲| 久久精品久久99精品久久| 波多野结衣精品在线| 欧美亚洲自拍偷拍| 精品成人在线观看| 亚洲一区二区三区四区不卡| 国产乱子伦视频一区二区三区 | 色激情天天射综合网| 日韩午夜在线观看| 亚洲情趣在线观看| 国内成人自拍视频| 欧美婷婷六月丁香综合色| 亚洲精品一区二区三区在线观看| 亚洲婷婷综合色高清在线| 日本亚洲三级在线| 91女厕偷拍女厕偷拍高清| 欧美mv日韩mv国产| 亚洲国产欧美另类丝袜| 国产精品亚洲а∨天堂免在线| 欧洲中文字幕精品| 欧美国产欧美亚州国产日韩mv天天看完整 | 欧美三级电影一区| 国产精品美女一区二区三区| 蜜臀精品一区二区三区在线观看| 99久久亚洲一区二区三区青草| 日韩欧美国产高清| 亚洲h在线观看| av高清久久久| 久久久噜噜噜久久人人看| 亚洲一区二区三区自拍| 99九九99九九九视频精品| 精品久久久网站| 日韩精品一级二级| 日本乱人伦aⅴ精品| 国产精品天天看| 国产成人综合在线观看| 欧美一区二区三区喷汁尤物| 亚洲一二三四在线观看| 成人av网站在线观看| 久久久亚洲欧洲日产国码αv| 丝袜国产日韩另类美女| 一本久道久久综合中文字幕| 国产精品国产三级国产aⅴ中文| 激情久久久久久久久久久久久久久久| 欧美三日本三级三级在线播放| 综合久久一区二区三区| 成人伦理片在线| 国产欧美一区二区三区鸳鸯浴| 精品一区二区三区日韩| 欧美一级日韩一级| 免费人成精品欧美精品| 欧美电影一区二区三区| 午夜精品久久久久久久蜜桃app| 欧美专区日韩专区| 玉足女爽爽91| 色噜噜狠狠色综合中国| 亚洲人妖av一区二区| 一本久久精品一区二区| 亚洲夂夂婷婷色拍ww47| 欧美日韩黄视频| 免费在线一区观看| 亚洲精品一区二区精华| 国产乱码精品一品二品| 国产欧美日韩在线| a级高清视频欧美日韩| 国产精品久久久久桃色tv| 一本久久综合亚洲鲁鲁五月天| 一区二区三区精密机械公司| 欧洲另类一二三四区| 三级久久三级久久| 亚洲精品在线观看网站| 国产寡妇亲子伦一区二区| 中文久久乱码一区二区| 972aa.com艺术欧美| 亚洲成人一区二区在线观看| 日韩一区二区三区电影在线观看| 国产综合一区二区| 18欧美亚洲精品| 欧美日韩一区二区三区四区五区| 日韩黄色片在线观看| 久久久久国产精品人| 99久久精品免费| 亚洲1区2区3区4区| 久久日韩精品一区二区五区| 成人av动漫在线|