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

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

?? instancelist.java

?? 本程序是用java語言編寫的數據挖掘分類算法中的決策樹分類方法c4.5程序代碼
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
package shared;
import java.lang.*;
import java.io.*;
import java.util.*;

/** The InstanceList class provides basic functions for ordered lists of
 * instances. Instances may be labelled or unlabelled. Depending on
 * usage, the list may or may not keep counts about various data in the list.
 * These counts are kept in the BagCounters class.                          <P>
 * Assumptions  :                                                           <P>
 * File format follows Quinlan (pp. 81-83) EXCEPT:                          <BR>
 * 1)  , : | \ . do not appear in names                                     <BR>
 * 2) . at end of lists is optional                                         <BR>
 * 3) a word that appears before the labels are enumerated, that is preceded by
 * \ is interpreted as a modifier.  Currently, the only implemented modifier is
 * "weighted", which indicates that the list will be weighted. This means that
 * labels are assumed to be nominal type for read_names().                  <P>
 * Comments     :                                                           <P>
 * Line numbers given are the result of '\n', not wrapping of lines.        <P>
 * "continuous" is not a legal name for the first nominal attribute value; it
 * is reserved to indicate a continuous(RealAttrInfo) attribute.            <P>
 * "discrete" is not a legal name for the first nominal attribute value; it is
 * reserved to indicate a discrete (NominalAttrInfo) attribute but with a
 * dynamic set of values to be specified as they appear in the data file.   <P>
 * "discrete n" is supported, where n is an estimate of the number of values of
 * the attribute.                                                           <P>
 * "nolabel" may be specified as the label field ONLY. If specified, it
 * indicates an unlabelled list.                                            <P>
 *
 * Enhancements :                                                           <P>
 * Cause fatal_error() if read_names() is called by methods other than the
 * constructor or InstanceList.read_names()                                 <P>
 * Extend read_attributes to handle AttrInfo other than NominalAttrInfo and
 * RealAttrInfo.                                                            <P>
 * Expand capability of input function to:                                  <P>
 * 1) allow . in name if not followed by a space                            <P>
 * 2) allow , : | and \ in names if preceded by a backslash                 <P>
 * (this would mimic Quinlan)                                               <P>
 * Use lex to do the lexical analysis of the input file. This will be critical
 * if the syntax becomes more complicated.                                  <P>
 * Ideally impute_unknown_values would  handle both nominal and real values in
 * a single pass.  It should accept an array of operators allowing each
 * attribute to handle unknowns in a different way.  Obvious operators would be:
 * unique_value, mode, mean...                                              <P>
 *
 * @author James Louis 12/08/2000 Ported to Java.
 * @author Alex Kozlov 8/22/96 Added transpose() function.
 * @author Dan Sommerfield 2/22/96 Combined BagSet/InstList/CtrInstList
 * into one class.
 * @author Robert Allen 1/27/95 Modify project() after spreading work to
 * Instance & Schema.
 * @author Richard Long 7/29/93 Initial revision (.h, .c)
 */
public class InstanceList implements Cloneable{
    
    /** The maximum number of attributes allowable in an Instance.**/
    private static int maxAttrVals;
    /** The maximum number of labels allowed for an Instance.**/
    private static int maxLabelVals;
    /** Indicator of whether the Instances in this InstanceList are weighted.**/
    private boolean weighted;
    /** The total weight of all Instances in this InstanceList.**/
    private double totalWeight;
    /** Counts of each classification label found in the Instances stored in
     * this object. **/
    private BagCounters bagCounters;
    /** Schema for the data stored in the file from which data in this object
     * is produced. **/
    private FileSchema fileSchema;
    /** Schema of attriubtes that will actually be used in computation. **/
    private Schema schema;
    /** Indicator for removing all Instances for which there are unknown values
     * on attributes.**/
    private static boolean removeUnknownInstances;
    /** Indicator that Instances that have no weight should be removed from the
     * InstanceList.**/
    private static boolean removeZeroWeights;
    /** The rate at which Instances should have attribute values replaced
     * with unknown values.**/
    private static double corruptToUnknownRate;
    /** The seed for random placement of unknown values.**/
    private static int unknownSeed;
    /** The random number generator used for the placement of unknown values.**/
    private static Random mrandomForUnknowns;
    /** Indicator that this InstanceList has been initialized with Instances**/
    private static boolean initialized;
    /** TRUE if the MineSet program is being used.**/
    private static boolean mineset = false;
    /** The maximum number of warnings that will be logged for unknown labels.**/
    private static int MAX_UNKNOWN_LABEL_WARNING = 10;
    /** The maximum number of warnings that will be logged for Instances with
     * negative weight values.**/
    private static int MAX_NEG_WEIGHT_WARNINGS = 10;
    
    /** The list of Instances.**/
    private LinkedList instances; //list of Instance references
    
    /** LogOptions object containing information for logging purposes.
     */    
    public static LogOptions logOptions = new LogOptions();
    
    /** Constructor.
     * @param file The root name of the file to be loaded into the InstanceList.
     */
    public InstanceList(String file) {
        instances = new LinkedList();
        weighted = false;
        totalWeight = 0;
        bagCounters = null;
        init_max_vals();
        String namesFile = new String(file + Globals.DEFAULT_NAMES_EXT);
        fileSchema = new FileSchema(namesFile);
        schema = fileSchema.create_schema();  //SchemaRC->Schema
        
        fileSchema.display();
        String dataName = file + Globals.DEFAULT_DATA_EXT;
        read_data(dataName,false);
    }
    
    /** Constructor. InstanceList(String, String, String) takes complexity of
     * InstanceList.read_names() + complexity of InstanceList.read_data().
     * @param file The root name of the file to be loaded into the InstanceList.
     * @param namesExtension The file extension for the schema file.
     * @param dataExtension The file extension for the data file.
     */
    public InstanceList( String file,
    String namesExtension,
    String dataExtension) {
        instances = new LinkedList();
        weighted = false;
        totalWeight = 0;
        bagCounters = null;
        init_max_vals();
        String namesFile = new String(file + namesExtension);
        fileSchema = new FileSchema(namesFile);
        schema = fileSchema.create_schema();
        String dataName = file + dataExtension;
        read_data(dataName, false);
    }
    
    /** Constructor.
     * @param catSchema The schema of categories for these data sets.
     * @param file The root name of the file to be loaded into the InstanceList.
     * @param namesExtension The file extension for the schema file.
     * @param testExtension The file extension for the test file.
     */
    public InstanceList(Schema catSchema,
    String file,
    String namesExtension,
    String testExtension) {
        instances = new LinkedList();
        totalWeight = 0;
        try{
            schema = new Schema(catSchema);
        }catch(CloneNotSupportedException e){
            Error.err("InstanceList:constructor(Schema)):clone not"
            +" supported exception caught");}
        fileSchema = null;
        weighted = false;
        bagCounters = null;
        
        init_max_vals();
        String namesFile = file + namesExtension;
        fileSchema = new FileSchema(namesFile);
        read_data(file + testExtension, true);
    }
    
    /** Constructor.
     * @param catSchema The schema of categories for these data sets.
     */
    public InstanceList(Schema catSchema) {
        instances = new LinkedList();
        totalWeight = 0;
        try{
            schema = new Schema(catSchema);
        }catch(CloneNotSupportedException e){
            Error.err("InstanceList:constructor(Schema)):clone not"
            +" supported exception caught");}
        fileSchema = null;
        weighted = false;
        bagCounters = null;
        
        init_max_vals();
    }
    
    /** Constructor.
     * @param catSchema The schema of categories for these data sets.
     * @param names The schema of attributes for these data sets.
     * @param testName The file name for the test file.
     */
    public InstanceList(Schema catSchema,
    FileSchema names,
    String testName) {
        instances = new LinkedList();
        weighted = false;
        totalWeight = 0;
        bagCounters = null;
        init_max_vals();
        fileSchema = new FileSchema(names);
        try{
            schema = new Schema(catSchema);
        }catch(CloneNotSupportedException e){
            Error.err("InstanceList:copyConstructor:clone not"
            +" supported exception caught");}
        read_data(testName, true);
    }
    
    /** Constructor.
     * @param source The InstanceList that is being copied.
     */
    public InstanceList(InstanceList source) {
        boolean preserveCounters = false;
        
        instances = new LinkedList();
        totalWeight = 0;
        try{
            schema = new Schema(source.schema);
        }catch(CloneNotSupportedException e){
            Error.err("InstanceList:copyConstructor:clone not"
            +" supported exception caught");}
        fileSchema = null;
        weighted = source.weighted;
        bagCounters = null;
        
        //weight is accumulated into totalWeight as instances are added.
        init_max_vals();
        ListIterator pix = source.instance_list().listIterator();
        Instance inst = null;
        while(pix.hasNext()) {
            inst = (Instance)pix.next();
            add_instance(inst);
        }
        //If we have a fileSchema, copy it.
        if(source.fileSchema != null)
            fileSchema = new FileSchema(source.fileSchema);
        
        //if we have counters and we want to preserve them, the copy.
        if(source.has_counters() && preserveCounters)
            bagCounters = new BagCounters(source.counters() );
        
        //DBG(OK());
    }
    
    /** Copy constructor.
     * @param source The InstanceList object to be copied.
     * @param preserveCounters TRUE if counters of values should be copied, FALSE otherwise.
     */    
    public InstanceList(InstanceList source, boolean preserveCounters) {
        instances = new LinkedList();
        totalWeight = 0 ; // will get set when instances are added
        try{
            schema = new Schema(source.schema);
        }catch(CloneNotSupportedException e){
            Error.err("InstanceList:copyConstructor:clone not"
            +" supported exception caught");}
        fileSchema = null;
        weighted = source.weighted;
        bagCounters = null;
        
        
        // weight is accumulated into totalWeight as instances are
        // added.
        init_max_vals();
        
        for (ListIterator pix = source.instance_list().listIterator();
        pix.hasNext();)
            add_instance((Instance)pix.next());
        
        // If we have a fileSchema, copy it.
        if(source.fileSchema != null)
            fileSchema = new FileSchema(source.fileSchema);
        
        // If we have counters and we want to preserve them, then copy.
        if(source.has_counters() && preserveCounters)
            bagCounters = new BagCounters(source.counters());
        
        //   if(Globals.DBG(OK();)
    }
    
    /** Build an instance list which is designed to be a test list for some
     * other training set.  The training set must have been built with a
     * FileSchema which will now be used to interpret the test data.
     * @param trainList The training InstanceList that will be used to identify Schema for test data set.
     * @param testName The name of the file containing the test data set.
     */
    public InstanceList(InstanceList trainList,String testName) {
        instances = new LinkedList();
        totalWeight = 0;
        try{
            schema = new Schema(trainList.get_schema());
        }catch(CloneNotSupportedException e){e.printStackTrace();System.exit(1);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美国十次了思思久久精品导航| 国产一区二区日韩精品| 精品1区2区在线观看| 99亚偷拍自图区亚洲| 五月天视频一区| 国产精品视频在线看| 这里只有精品电影| 色综合天天综合色综合av | 中文字幕免费一区| 欧美日韩在线电影| 福利一区二区在线观看| 日本午夜精品视频在线观看| 亚洲免费在线观看视频| 国产欧美中文在线| 日韩精品综合一本久道在线视频| 在线视频欧美区| 99在线精品观看| 成人性生交大片免费看中文网站| 蜜臀va亚洲va欧美va天堂 | 日日噜噜夜夜狠狠视频欧美人| 国产精品久久久久一区二区三区共| 欧美成人艳星乳罩| 欧美在线观看禁18| 91在线观看高清| 国产不卡视频在线播放| 精品夜夜嗨av一区二区三区| 天天综合色天天| 午夜精品福利一区二区蜜股av| 亚洲色图视频网站| 国产精品福利一区二区三区| 久久久欧美精品sm网站| 精品乱码亚洲一区二区不卡| 91精品国产综合久久精品| 欧美色精品在线视频| 在线观看欧美黄色| 色天使色偷偷av一区二区| 97久久超碰精品国产| 成人免费视频免费观看| 成人综合在线视频| 成人性生交大片免费看在线播放 | 午夜精品久久久久| 偷偷要91色婷婷| 午夜精品久久久久久久久久久| 亚洲一区二区三区影院| 亚洲福利国产精品| 亚洲成av人片一区二区梦乃| 亚洲福利视频一区二区| 免费高清在线视频一区·| 美女视频免费一区| 国内精品久久久久影院色| 国产一区二区中文字幕| 国产寡妇亲子伦一区二区| 成人av午夜电影| 色综合天天视频在线观看| 色网综合在线观看| 欧美日韩高清不卡| 日韩精品一区二区三区四区视频| 2023国产精华国产精品| 国产精品色婷婷| 亚洲精品免费在线播放| 午夜精品视频一区| 狠狠狠色丁香婷婷综合激情| 国产suv一区二区三区88区| 91小视频在线观看| 欧美日韩国产小视频在线观看| 欧美一二三在线| 久久先锋影音av| 成人欧美一区二区三区视频网页| 亚洲精品成人天堂一二三| 日韩精品视频网站| 久久狠狠亚洲综合| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 日韩一区日韩二区| 午夜精品久久久久| 国产成人小视频| 欧美唯美清纯偷拍| 精品久久久久久久久久久久久久久| 国产欧美一区二区在线观看| 亚洲精品国产第一综合99久久 | 日本aⅴ免费视频一区二区三区| 久久超碰97人人做人人爱| 成人激情av网| 欧美一区三区四区| 亚洲欧洲精品一区二区精品久久久| 亚洲一线二线三线久久久| 韩国精品主播一区二区在线观看 | 亚洲国产精品传媒在线观看| 亚洲影视在线观看| 国产成人欧美日韩在线电影| 欧美艳星brazzers| 久久精品视频在线免费观看| 亚洲一区二区美女| 国产成人啪免费观看软件| 精品视频1区2区3区| 久久亚洲精精品中文字幕早川悠里| 一区二区三区欧美亚洲| 美女国产一区二区| 91麻豆免费视频| 精品伦理精品一区| 五月天激情小说综合| 成人亚洲一区二区一| 日韩你懂的在线播放| 一区二区三区自拍| 粗大黑人巨茎大战欧美成人| 欧美一二三区在线| 亚洲电影第三页| 9l国产精品久久久久麻豆| 精品美女一区二区| 欧美a一区二区| 欧洲视频一区二区| 中文字幕一区二区三区四区 | 久久精品人人做人人爽97| 日韩成人av影视| 在线观看亚洲精品视频| 国产精品久久久久影院色老大| 精品中文字幕一区二区| 91麻豆精品国产| 亚洲一二三四在线| 一本大道久久a久久精品综合| 国产色婷婷亚洲99精品小说| 黄色精品一二区| 日韩一区二区在线观看视频播放| 亚洲一区二区3| 欧美在线观看18| 亚洲一二三区在线观看| 色成人在线视频| 亚洲精品第一国产综合野| 色综合天天视频在线观看| 国产精品福利av| 99re热视频这里只精品| 中文字幕一区二区三区四区不卡 | 日韩黄色小视频| 欧美一区二区三区在线视频| 亚洲成人手机在线| 欧美三级在线看| 图片区日韩欧美亚洲| 91精品国产免费| 理论片日本一区| 精品三级在线看| 国产成人在线免费| 国产精品网站一区| 成人av中文字幕| 亚洲另类在线一区| 在线中文字幕一区| 亚洲va国产va欧美va观看| 9191精品国产综合久久久久久| 天天av天天翘天天综合网色鬼国产| 欧美日韩一区三区四区| 日本不卡视频一二三区| 欧美一级在线视频| 国产一区二区三区在线观看免费视频 | 日韩一区二区三区免费看 | 久久er精品视频| 久久久久久久综合色一本| 国产a区久久久| 亚洲人成在线观看一区二区| 色播五月激情综合网| 五月激情综合网| 26uuu色噜噜精品一区| 国产福利电影一区二区三区| 国产精品久久久久久久久果冻传媒 | 五月天一区二区| 精品人伦一区二区色婷婷| 国产乱码精品一区二区三区忘忧草| 日本一区二区免费在线 | 中文字幕亚洲在| 欧美色图一区二区三区| 秋霞午夜av一区二区三区| 国产日韩亚洲欧美综合| 欧美中文字幕亚洲一区二区va在线| 视频在线观看一区| 久久精品在线观看| 欧美综合在线视频| 精品亚洲成av人在线观看| 亚洲色图在线播放| 精品女同一区二区| 91婷婷韩国欧美一区二区| 日本亚洲最大的色成网站www| 日韩精品影音先锋| 91在线免费看| 六月丁香婷婷久久| 亚洲区小说区图片区qvod| 日韩一区二区中文字幕| 91视视频在线观看入口直接观看www| 日韩成人av影视| 亚洲丝袜自拍清纯另类| 日韩欧美亚洲国产另类| 91亚洲大成网污www| 久久精品72免费观看| 亚洲一区在线观看免费观看电影高清| 精品国产免费久久 | 欧美va在线播放| 色综合久久久久综合体| 精品在线你懂的| 亚洲国产wwwccc36天堂| 国产喷白浆一区二区三区| 欧美区一区二区三区| 99国产精品久| 国产成人精品影院| 蜜芽一区二区三区|