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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? instance.java

?? java數(shù)據(jù)挖掘算法
?? 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);
    }
    
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品女同互慰在线看| 色综合天天综合色综合av| 亚洲欧美激情在线| 中文字幕不卡的av| 国产欧美一区二区三区沐欲| 久久久久久久av麻豆果冻| 精品88久久久久88久久久| 日韩片之四级片| 久久影院视频免费| 久久精品免费在线观看| 国产欧美日韩三区| 中文在线资源观看网站视频免费不卡| ww亚洲ww在线观看国产| 欧美激情一区二区三区四区 | 欧美视频在线一区| 在线观看一区日韩| 欧美精品日韩一本| 欧美xxxxx牲另类人与| 欧美精品一区二区三区四区 | 日韩av高清在线观看| 午夜电影久久久| 精品一区二区免费| 国产精品综合网| 91色视频在线| 欧美高清性hdvideosex| 精品毛片乱码1区2区3区| 国产午夜亚洲精品羞羞网站| 中文字幕一区二区在线播放| 玉足女爽爽91| 石原莉奈在线亚洲三区| 国产精品影视网| 91丝袜高跟美女视频| 欧美精品久久久久久久久老牛影院| 91精品在线观看入口| 国产欧美日韩在线视频| 免费看黄色91| 国产高清精品久久久久| 色婷婷精品久久二区二区蜜臂av| 欧美色综合久久| 久久久精品日韩欧美| 一区二区三区四区视频精品免费 | 日本欧美大码aⅴ在线播放| 精品在线免费视频| 色欧美片视频在线观看| 日韩欧美一区二区视频| 亚洲人精品一区| 国产一区二区免费看| 欧美系列亚洲系列| 国产欧美日韩在线看| 男男视频亚洲欧美| 色猫猫国产区一区二在线视频| 日韩欧美国产综合一区| 亚洲美女免费在线| 国产成人福利片| 欧美成人艳星乳罩| 一区二区在线免费观看| 国产成人免费av在线| 884aa四虎影成人精品一区| 亚洲欧美日韩久久| 国产91丝袜在线播放| 欧美一级免费观看| 亚洲成人激情自拍| 91久久精品日日躁夜夜躁欧美| 久久新电视剧免费观看| 热久久久久久久| 欧美日韩国产区一| 亚洲国产乱码最新视频| 91免费小视频| 亚洲欧美激情插| 一本一道久久a久久精品| 亚洲一二三四区| 99久久婷婷国产精品综合| 国产日本亚洲高清| 成人污视频在线观看| 国产丝袜欧美中文另类| 国产福利不卡视频| 中文字幕乱码日本亚洲一区二区 | 国产福利91精品| 亚洲精品一线二线三线| 激情成人综合网| 久久久精品2019中文字幕之3| 久草这里只有精品视频| 欧美不卡一区二区三区| 精品写真视频在线观看| 日韩一区二区三区视频| 精品一区二区三区在线观看国产 | 免费人成在线不卡| 日韩午夜av一区| 狠狠色丁香久久婷婷综| 国产欧美日韩不卡免费| 粉嫩aⅴ一区二区三区四区五区| 国产日产精品1区| 一本久久综合亚洲鲁鲁五月天| 亚洲免费观看高清完整版在线| 91尤物视频在线观看| 亚洲一区二区三区四区五区黄| 欧洲精品在线观看| 日韩精品成人一区二区在线| 这里只有精品免费| 国产精品一区二区久激情瑜伽| 欧美韩国一区二区| 欧美在线你懂的| 日韩电影在线观看电影| 久久久久久久久99精品| 99久久精品国产一区二区三区| 一区二区三区欧美久久| 欧美一级免费大片| 成人sese在线| 视频一区二区不卡| 国产日本一区二区| 欧美日韩精品福利| 国产成人丝袜美腿| 亚洲图片欧美色图| 精品福利一二区| 91久久免费观看| 色综合久久天天| 视频一区在线视频| 中文字幕一区在线观看| 日韩一区二区三区电影| 成人黄色片在线观看| 天堂av在线一区| 日韩伦理免费电影| 亚洲精品在线观看视频| 欧美色图激情小说| 不卡的看片网站| 久久se精品一区二区| 亚洲精品水蜜桃| 国产欧美日韩三级| 日韩美一区二区三区| 欧美自拍丝袜亚洲| 播五月开心婷婷综合| 久久超碰97人人做人人爱| 亚洲高清中文字幕| 亚洲女爱视频在线| 国产清纯在线一区二区www| 337p亚洲精品色噜噜| 色88888久久久久久影院野外| 韩国午夜理伦三级不卡影院| 五月天国产精品| 夜夜亚洲天天久久| 最新日韩在线视频| 国产精品久久精品日日| 精品国产不卡一区二区三区| 欧美一级黄色录像| 精品视频在线看| 欧美三级中文字幕| 欧美在线观看一区| 在线视频一区二区免费| 福利视频网站一区二区三区| 国产真实乱偷精品视频免| 午夜电影网一区| 天天色天天操综合| 性感美女久久精品| 视频在线在亚洲| 免费成人在线播放| 蜜桃精品视频在线| 麻豆91免费看| 国产一区二区三区精品视频| 黄色成人免费在线| 国产在线乱码一区二区三区| 国产一区二区三区黄视频 | 国产精品色婷婷| 国产精品网曝门| 成人免费小视频| 亚洲欧美日韩国产中文在线| 亚洲欧美激情一区二区| 亚洲一区二区美女| 亚洲电影视频在线| 蜜臀av性久久久久蜜臀aⅴ | 久久久久9999亚洲精品| 国产视频一区不卡| 亚洲三级电影网站| 五月激情综合网| 国产剧情在线观看一区二区| 高清不卡一区二区| 不卡一区二区三区四区| aaa亚洲精品一二三区| 91成人免费在线视频| 在线观看亚洲精品| 欧美精选在线播放| 2021久久国产精品不只是精品| 亚洲国产精品成人综合| 一区二区三区精品在线观看| 日韩中文欧美在线| 国产不卡视频在线播放| 色狠狠综合天天综合综合| 制服丝袜日韩国产| 欧美经典一区二区三区| 成人免费一区二区三区视频 | 国产精品一二三四区| 97久久精品人人做人人爽| 91精品欧美综合在线观看最新 | av电影在线观看不卡 | 成人av网址在线| 欧美日韩一区二区电影| 久久久高清一区二区三区| 亚洲自拍偷拍图区| 韩国精品久久久| 欧美色倩网站大全免费| 国产亚洲综合在线|