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

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

?? instancelist.java

?? 本程序是用java語言編寫的數據挖掘分類算法中的決策樹分類方法c4.5程序代碼
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
            //obs	 //ListIterator temp = pix;
            //obs	 //pix.next();
            
            //Change instance, add to end.  Add instance by hand so we can avoid
            // checking the schema (whch we know won't match at this point)
            //Don't touch the weight, because we're effectively adding
            // and removing the same instance here.
            
            Instance temp = (Instance)instance_list().get(index); //temp.next();
            Instance instance = temp.project(newSchema, projMask);
            MLJ.ASSERT(instance.get_weight() == temp.get_weight(),"InstanceList.project_in_place: ");
            MLJ.ASSERT(bagCounters == null,"InstanceList.project_in_place: bagCounters not equal to null.");
            instance_list().set(index++, instance);
            
            
            //obs	 Instance instance = (Instance)instance_list().get(index++); //temp.next();
            //obs	 instance.project(newSchema, projMask);
            //obs	 //MLJ.ASSERT(instance.get_weight == instance.get_weight()),"InstanceList.project_in_place: ");
            //obs	 MLJ.ASSERT(bagCounters == null,"InstanceList.project_in_place: bagCounters not equal to null.");
            //obs	 int place = instance_list().indexOf(instance);
            //obs         instance_list().set(place, instance);
            //obs         //instance_list().add(instance);
            //obs	 //instance_list().remove(instance);
        }
        
        //We should not have changed the number of instance
        if(numInstBefore != num_instances())
            Error.err("Assert Error, num instances changes");
        
        //swap schemas
        schema = null;
        schema = newSchema;
        if (Globals.DBG) newSchema = null;
        
        //DBG(OK())
    }
    
    /** Clones the supplied Schema and sets this InstanceList object to use it.
     * @param schemaRC The Schema object to be cloned into this InstanceList object.
     * @throws CloneNotSupportedException if the cloning process of the Schema object encounters an error.
     */    
    public void set_schema(Schema schemaRC) throws CloneNotSupportedException {
        //If we already have the schema set, save time.
        //This happens when normalizing assigns a get_unique_copy()
        //schema
        
        //This formerly recursive call has been collapsed here because
        //it used 'this' overloading, not sure how to do this in Java
        
        for(int i=0;i<instances.size();i++){
            Instance inst = (Instance)instances.get(i);
            
            if(schema == null || (schemaRC != schema) ||
            (inst.get_schema() != schema )) {
                if(schemaRC != schema) {
                    schema = null;
                    schema = new Schema(schemaRC);
                }
                
            }
            //DBG(OK());
        }
    }
    
    /** Change the value of an attribute value in each instance to unknown with the
     * given probability.
     * @param rate A number ranging from 0..1 indicating the probability of changing a specific
     * Instance's value to unknown.
     * @param mrandom Random number generator for randomly determining if Instance value should be
     * changed.
     */    
    private void corrupt_values_to_unknown(double rate, Random mrandom) {
        //mlc.clamp_to_range(rate, 0, 1,"InstanceList.corrupt_values_to_unknown"
        //   +": rate outside [0,1]");
        
        InstanceList tempInstList = new InstanceList(this);
        remove_all_instances();
        
        ListIterator pix = instance_list().listIterator();
        Instance instance = null;
        for(;pix.hasNext()==true;instance = (Instance)pix.next()) {
            for(int i=0;i<num_attr();i++)
                if(rate > mrandom.nextDouble()) //not equal for zero to work
                    attr_info(i).set_unknown(instance.get_value(i));
            add_instance(instance);
        }
    }
    
    /** Returns the information about a specific attribute stored in this
     * InstanceList.
     * @return An AttrInfo containing the information about the attribute.
     * @param attrNum	The number of the attribute about which information is
     * requested.
     */
    public AttrInfo attr_info(int attrNum){return get_schema().attr_info(attrNum);}
    
    /** Returns the number of attributes in the InstanceList.
     * @return An integer representing the number of attributes used for each
     * instance in this InstanceList.
     */
    public int num_attr(){return get_schema().num_attr();}
    
    /** Returns the maximum number of attributes that can be used for Instances
     * in this InstanceList.
     * @return The maximum number of attributes.
     */
    public static int get_max_attr_vals(){return maxAttrVals;}
    
    /** Returns the maximum number of labes that can be used to categorize
     * Instances in this InstanceList.
     * @return The maximum number of labels.
     */
    public static int get_max_label_vals(){return maxLabelVals;}
    
    /** Sets the maximum number of attributes for Instances in this InstanceList.
     * @param maxVals	The maximum number of attributes allowed for Instances
     * in this InstanceList.
     */
    public static void set_max_attr_vals(int maxVals){maxAttrVals = maxVals;}
    
    /** Sets the maximum number of labesl for Instances to be categorized as in
     * this InstanceList.
     * @param maxVals	The maximum number of labels that instances may be
     * categorized as.
     */
    public static void set_max_label_vals(int maxVals){maxLabelVals = maxVals;}
    
    /** Returns the Schema for this InstanceList.
     * @return The Schema of Instances in this InstanceList.
     */
    public Schema get_schema() {
        if(schema == null)
            Error.err("InstanceList.get_schema: schema "
            +"has not been set --> fatal_error");
        return schema;
    }
    
    /** Returns the FileSchema loaded into this InstanceList.
     * @return The FileSchema for this InstanceList.
     */
    public FileSchema get_original_schema() {
        if(fileSchema==null)
            Error.err("InstanceList.get_original_schema: there"
            +" is no FileSchema associated with this list-->fatal_error");
        return fileSchema;
    }
    
    /** InstanceList.read_data_line() takes time proportional to the number
     * of characters in the portion of the file that it reads + the total number
     * of possible attribute values for the _Instance.
     * @param dataFile BufferedReader that reads the file containing data.
     * @param isTest TRUE if this file contains testing data.
     * @param reader InstanceReader for reading Instances from the file.
     */
    
    private void read_data_line(BufferedReader dataFile, boolean isTest,InstanceReader reader) {
        
        //isTest;
        fileSchema.skip_white_comments_same_line(dataFile);
        try{
            MLJ.ASSERT(fileSchema != null,"InstanceList.read_data_line: fileSchema is null");
            for(int i=0;i<fileSchema.num_attr();i++){
                reader.set_from_file(i,dataFile);
                dataFile.mark(1);
                char c = (char)dataFile.read();
                dataFile.reset();
                if(c == ',')
                    dataFile.read();
            }
            
            dataFile.mark(1);
            char c = (char)dataFile.read();
            dataFile.reset();
            if(c == '.'){
                dataFile.read();
                if(fileSchema.skip_white_comments_same_line(dataFile))
                    Error.err("InstanceList.read_data_line: Illegal"
                    +" file format, Only comments or whitespace may follow a '.' "
                    +" on a line in data file");
            }
            else if (c != '\n' && c != '|')
                Error.err("InstanceList.read_data_line: Illegal"
                +" file format, Only comments or whitespace or a '.' may "
                +" follow the last value on a line in data file");
            else
                fileSchema.skip_white_comments_same_line(dataFile);
            reader.add_instance();
        }catch(IOException e){Error.err("InstanceList."
        +"read_data_line: can't read file");}
    }
    
    /** InstanceList.read_data_line() takes time proportional to the number
     * of characters in the portion of the file that it reads + the total number
     * of possible attribute values for the _Instance.
     * @param dataStream StreamTokenizer that reads data from the file.
     * @param isTest TRUE if this file contains testing data.
     * @param reader InstanceReader for reading Instances from the file.
     */    
    private void read_data_line(StreamTokenizer dataStream, boolean isTest,InstanceReader reader) {
        int h;
        //isTest;
        //      fileSchema.skip_white_comments_same_line(dataFile);
        try{
            MLJ.ASSERT(fileSchema != null,"InstanceList.read_data_line: fileSchema is null");
            for(int i=0;i<fileSchema.num_attr();i++){
                h = i+1;
                if (h == fileSchema.num_attr()) h = 0;
                if(fileSchema.attrInfos[h] instanceof RealAttrInfo)
                {parseNumbers(dataStream, true);}
                else {parseNumbers(dataStream, false);}
                reader.set_from_file(i,dataStream);
                dataStream.nextToken();
                if((char)dataStream.ttype == ',')
                    dataStream.nextToken();
                //         dataFile.mark(1);
                //         char c = (char)dataFile.read();
                //         dataFile.reset();
                //         if(c == ',')
                //            dataFile.read();
            }
            //      dataFile.mark(1);
            //      char c = (char)dataFile.read();
            //      dataFile.reset();
            //      if(c == '.'){
            //         dataFile.read();
            if((char)dataStream.ttype == '.')
                for( ;dataStream.nextToken() != StreamTokenizer.TT_EOL; )
                    if (dataStream.ttype != StreamTokenizer.TT_EOL)
                        Error.err("InstanceList.read_data_line: Illegal"
                        +" file format, Only comments or whitespace may follow a '.' "
                        +" on a line in data file");
            //         if(fileSchema.skip_white_comments_same_line(dataFile))
            //            Error.err("InstanceList.read_data_line: Illegal"
            //	       +" file format, Only comments or whitespace may follow a '.' "
            //	       +" on a line in data file");
            //      }
            //      else if (c != '\n' && c != '|')
                    else if(dataStream.ttype != StreamTokenizer.TT_EOL)
                        Error.err("InstanceList.read_data_line: Illegal"
                        +" file format, Only comments or whitespace or a '.' may "
                        +" follow the last value on a line in data file");
            //      else
            //         fileSchema.skip_white_comments_same_line(dataFile);
            reader.add_instance();
        }catch(IOException e){Error.err("InstanceList."
        +"read_data_line: can't read file");}
    }
    
    /** Sets the maximum values for attributes and labels in this InstanceList
     * according to the MLJ options stored in the MLJ-options file. These options
     * are MAX_ATTR_VALS and MAX_LABEL_VALS.
     */
    public void init_max_vals() {
        GetEnv getenv = new GetEnv();
        
        initialized = false;
        if(initialized) return;
        
        initialized = true;
        
        //changed the signature of these functions - possible adverse effects
        InstanceList.set_max_attr_vals(getenv.get_option_int("MAX_ATTR_VALS"));
        InstanceList.set_max_label_vals(getenv.get_option_int("MAX_LABEL_VALS"));
        
    }
    
    /** Displays the Instances stored in this InstanceList.
     * InstanceList.display() takes time proportional to the
     * number of instances * the number of attributes per instance.
     *
     * @param normalizeReal	TRUE if the Instances should be normalized according
     * to the min/max stored for real attributes. If
     * min equals max, values are normalized to .5.
     */
    public void display(boolean normalizeReal) {
        
        ListIterator pix = instances.listIterator(0);
        while(pix.hasNext()) {
            Instance inst = (Instance)pix.next();
            inst.display(is_weighted(), normalizeReal);
        }
        if(no_instances())
            System.out.println("InstanceList.display: No instances");
    }
    
    /** Checks if Instances stored in this InstanceList are weighted.
     * @return TRUE if the Instances are weighted, FALSE otherwise.
     */
    public boolean is_weighted() {
        return weighted;
    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品欧美乱码久久久久久1区2区 | 欧美成人精品高清在线播放| 91在线观看下载| 成人黄色网址在线观看| 福利一区二区在线| 成人免费视频caoporn| 豆国产96在线|亚洲| 成人av在线播放网址| 99久久精品免费看国产| 91毛片在线观看| 91成人看片片| 欧美军同video69gay| 欧美久久久久久蜜桃| 精品人在线二区三区| 欧美精品一区二区三区四区 | 五月激情综合色| 日韩二区三区四区| 久热成人在线视频| 国产成人在线电影| 91在线你懂得| 91精品国产91综合久久蜜臀| 欧美不卡一区二区三区| 1000部国产精品成人观看| 亚洲午夜免费电影| 久久er精品视频| 色综合天天在线| 欧美一区二区三区视频| 国产亚洲精品资源在线26u| 综合欧美一区二区三区| 日本不卡一区二区| 成人午夜免费电影| 欧美精品 日韩| 国产精品青草久久| 石原莉奈在线亚洲二区| 成人久久视频在线观看| 欧美电影影音先锋| 亚洲欧洲日韩综合一区二区| 日韩成人伦理电影在线观看| 成人av网站免费| 日韩欧美资源站| 国产精品福利在线播放| 日韩成人免费看| 在线观看日韩电影| 国产免费观看久久| 日韩成人免费电影| 欧美综合色免费| 国产精品久久久久aaaa| 久久精品99国产精品日本| 色88888久久久久久影院野外| 中文字幕第一区综合| 亚洲一区二区偷拍精品| 高潮精品一区videoshd| 精品久久久久久亚洲综合网| 性感美女极品91精品| 一本大道综合伊人精品热热| 亚洲国产高清在线观看视频| 美女脱光内衣内裤视频久久网站 | 亚洲国产精品自拍| 成人av在线资源网站| 精品国产一二三区| 日韩高清在线一区| 欧美在线三级电影| 亚洲三级久久久| 99久久99久久精品免费观看| 久久精品一区二区三区不卡| 激情文学综合插| 日韩欧美不卡在线观看视频| 日韩在线播放一区二区| 在线观看欧美精品| 亚洲综合激情小说| 一本色道久久加勒比精品| 自拍偷拍国产亚洲| 色综合久久天天综合网| 亚洲精品欧美二区三区中文字幕| 成人激情免费视频| 日韩av一级片| 91麻豆精品国产91久久久使用方法| 亚洲影院在线观看| 6080午夜不卡| 久久国产日韩欧美精品| 久久蜜臀精品av| 成人午夜av电影| 亚洲精品日韩一| 欧美精品久久99久久在免费线| 五月天一区二区| 日韩免费成人网| 国产成人在线视频播放| 亚洲欧美综合在线精品| 91在线视频官网| 午夜影院久久久| 日韩一区二区三区电影在线观看 | 成人app网站| 亚洲日本青草视频在线怡红院| 色综合天天性综合| 无码av中文一区二区三区桃花岛| 91精品国产一区二区人妖| 国精产品一区一区三区mba视频| 国产农村妇女精品| 在线视频你懂得一区| 日韩国产成人精品| 国产性天天综合网| 色综合久久88色综合天天| 亚洲国产精品欧美一二99| 欧美成人a视频| jizz一区二区| 日本中文字幕一区| 中文字幕中文字幕中文字幕亚洲无线| 色88888久久久久久影院野外| 奇米影视在线99精品| 国产精品久久久久久久久搜平片| 欧美午夜免费电影| 国产精品正在播放| 亚洲一区二区偷拍精品| 久久久久久免费毛片精品| 色偷偷成人一区二区三区91| 久久国产精品无码网站| 成人免费在线视频| 日韩三级视频在线观看| 91麻豆123| 国产综合久久久久久鬼色 | 日韩一区二区高清| av不卡免费在线观看| 麻豆极品一区二区三区| 亚洲蜜臀av乱码久久精品| www激情久久| 欧美日韩电影一区| 99r国产精品| 国产一区二区三区四| 日本大胆欧美人术艺术动态 | 欧美一区二区三区免费视频| 99久久精品一区| 国产美女av一区二区三区| 日本最新不卡在线| 亚洲一二三专区| 亚洲人快播电影网| 国产精品九色蝌蚪自拍| 精品国产成人在线影院| 5月丁香婷婷综合| 欧美色男人天堂| 91在线观看免费视频| 国产98色在线|日韩| 国产乱码一区二区三区| 国产综合久久久久久鬼色| 蜜桃在线一区二区三区| 日韩电影一区二区三区四区| 亚洲成av人**亚洲成av**| 亚洲乱码精品一二三四区日韩在线| 国产精品麻豆99久久久久久| 欧美国产精品久久| 国产欧美日韩精品一区| 久久免费看少妇高潮| 国产亚洲人成网站| 国产丝袜美腿一区二区三区| 久久精品视频免费| 欧美经典一区二区| 中日韩免费视频中文字幕| 国产精品色噜噜| 17c精品麻豆一区二区免费| 国产精品国产自产拍高清av王其| 国产精品久久777777| 一区二区三区四区亚洲| 亚洲一区二区精品视频| 日韩专区中文字幕一区二区| 蜜臀久久99精品久久久久宅男| 日本成人在线不卡视频| 久草在线在线精品观看| 国产精品自产自拍| www.日韩在线| 欧美日韩一区二区三区高清| 日韩午夜激情免费电影| 久久亚洲综合av| 亚洲欧洲日产国码二区| 五月天视频一区| 国产永久精品大片wwwapp| 成人高清视频免费观看| 色琪琪一区二区三区亚洲区| 制服视频三区第一页精品| 日韩精品一区二| 亚洲欧洲国产专区| 亚洲va欧美va国产va天堂影院| 蜜桃久久久久久久| 成人黄色在线视频| 欧美老人xxxx18| 日本一区二区三区视频视频| 亚洲人成人一区二区在线观看| 香蕉加勒比综合久久| 国产成人精品aa毛片| 欧美日韩三级视频| 久久精品人人做人人综合| 亚洲人成网站影音先锋播放| 另类成人小视频在线| 91同城在线观看| 欧美一级日韩一级| 亚洲天堂a在线| 国产一区二区视频在线| 欧美丝袜第三区| 国产精品国产三级国产三级人妇| 日韩精品91亚洲二区在线观看 | 5858s免费视频成人| 国产精品免费av|