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

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

?? assocrulemining.java

?? java platform java-growth algorithm
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:

    1) For each record in the data array. Create an empty new itemSet array.
    2) Place into this array any column numbers in record that are
       supported at the index contained in the conversion array.
    3) Assign new itemSet back into to data array */

    public void recastInputDataAndPruneUnsupportedAtts() {
        short[] itemSet;
	int attribute;

	// Step through data array using loop construct

        for(int rowIndex=0;rowIndex<dataArray.length;rowIndex++) {
	    // Check for empty row
	    if (dataArray[rowIndex]!= null) {
	        itemSet = null;
	        // For each element in the current record find if supported with
	        // reference to the conversion array. If so add to "itemSet".
	    	for(int colIndex=0;colIndex<dataArray[rowIndex].length;colIndex++) {
	            attribute = dataArray[rowIndex][colIndex];
		    // Check support
		    if (conversionArray[attribute][1] >= minSupport) {
		        itemSet = reallocInsert(itemSet,
		    			(short) conversionArray[attribute][0]);
		        }
		    }
	        // Return new item set to data array
	        dataArray[rowIndex] = itemSet;
	 	}
	    }

	// Set isPrunedFlag (used with GUI interface)
	isPrunedFlag=true;
	// Reset number of one item sets field
	numOneItemSets = getNumSupOneItemSets();
	}

    /* GET NUM OF SUPPORTE ONE ITEM SETS */
    /** Gets number of supported single item sets (note this is not necessarily
    the same as the number of columns/attributes in the input set).
    @return Number of supported 1-item sets */

    protected int getNumSupOneItemSets() {
        int counter = 0;

	// Step through conversion array incrementing counter for each
	// supported element found

	for (int index=1;index < conversionArray.length;index++) {
	    if (conversionArray[index][1] >= minSupport) counter++;
	    }

	// Return

	return(counter);
	}

    /* RESIZE INPUT DATA */

    /** Recasts the input data sets so that only N percent is used.
    @param percentage the percentage of the current input data that is to form
    the new input data set (number between 0 and 100). */

    public void resizeInputData(double percentage) {
	// Redefine number of rows
	numRows = (int) ((double) numRows*(percentage/100.0));
        System.out.println("Recast input data, new num rows = " + numRows);

	// Dimension and populate training set.
	short[][] trainingSet = new short[numRows][];
	for (int index=0;index<numRows;index++)
				trainingSet[index] = dataArray[index];

	// Assign training set label to input data set label.
	dataArray = trainingSet;

	// Determine new minimum support threshold value

	minSupport = (numRows * support)/100.0;
	}

    /** Reconverts given item set according to contents of reconversion array.
    @param itemSet the fgiven itemset.
    @return the reconverted itemset. */	
    
    protected short[] reconvertItemSet(short[] itemSet) {
        // If no conversion return orginal item set
	if (reconversionArray==null) return(itemSet); 
	
	// If item set null return null
	if (itemSet==null) return(null);
	
	// Define new item set
	short[] newItemSet = new short[itemSet.length];
	
	// Copy
	for(int index=0;index<newItemSet.length;index++) {
	    newItemSet[index] = reconversionArray[itemSet[index]];
	    }
	
	// Return
	return(newItemSet);    
        }

    /** Reconvert single item if appropriate. 
    @param item the given item (attribute).
    @return the reconvered item. */
    
    protected short reconvertItem(short item) {
        // If no conversion return orginal item
	if (reconversionArray==null) return(item); 
	
	// Otherwise rerturn reconvert item
	return(reconversionArray[item]);
	}
	
    /* -------------------------------------------------------------- */
    /*                                                                */
    /*        RULE LINKED LIST ORDERED ACCORDING TO CONFIDENCE        */
    /*                                                                */
    /* -------------------------------------------------------------- */

    /* Methods for inserting rules into a linked list of rules ordered
    according to confidence (most confident first). Each rule described in
    terms of 3 fields: 1) Antecedent (an item set), 2) a consequent (an item
    set), 3) a confidence value (double). <P> The support field is not used. */

    /* INSERT (ASSOCIATION/CLASSIFICATION) RULE INTO RULE LINKED LIST (ORDERED
    ACCORDING CONFIDENCE). */

    /** Inserts an (association/classification) rule into the linkedlist of
    rules pointed at by <TT>startRulelist</TT>. <P> The list is ordered so that
    rules with highest confidence are listed first. If two rules have the same
    confidence the new rule will be placed after the existing rule. Thus, if
    using an Apriori approach to generating rules, more general rules will
    appear first in the list with more specific rules (i.e. rules with a larger
    antecedent) appearing later as the more general rules will be generated
    first.
    @param antecedent the antecedent (LHS) of the rule.
    @param consequent the consequent (RHS) of the rule.
    @param confidenceForRule the associated confidence value.  */

    protected void insertRuleintoRulelist(short[] antecedent,
    				short[] consequent, double confidenceForRule) {

	// Create new node
	RuleNode newNode = new RuleNode(antecedent,consequent,
							confidenceForRule);

	// Empty list situation
	if (startRulelist == null) {
	    startRulelist = newNode;
	    return;
	    }

	// Add new node to start
	if (confidenceForRule > startRulelist.confidenceForRule) {
	    newNode.next = startRulelist;
	    startRulelist  = newNode;
	    return;
	    }

	// Add new node to middle
	RuleNode markerNode = startRulelist;
	RuleNode linkRuleNode = startRulelist.next;
	while (linkRuleNode != null) {
	    if (confidenceForRule > linkRuleNode.confidenceForRule) {
	        markerNode.next = newNode;
		newNode.next    = linkRuleNode;
		return;
		}
	    markerNode = linkRuleNode;
	    linkRuleNode = linkRuleNode.next;
	    }

	// Add new node to end
	markerNode.next = newNode;
	}

    /* ----------------------------------------------- */
    /*                                                 */
    /*        ITEM SET INSERT AND ADD METHODS          */
    /*                                                 */
    /* ----------------------------------------------- */

    /* REALLOC INSERT */

    /** Resizes given item set so that its length is increased by one
    and new element inserted.
    @param oldItemSet the original item set
    @param newElement the new element/attribute to be inserted
    @return the combined item set */

    protected short[] reallocInsert(short[] oldItemSet, short newElement) {

	// No old item set

	if (oldItemSet == null) {
	    short[] newItemSet = {newElement};
	    return(newItemSet);
	    }

	// Otherwise create new item set with length one greater than old
	// item set

	int oldItemSetLength = oldItemSet.length;
	short[] newItemSet = new short[oldItemSetLength+1];

	// Loop

	int index1;
	for (index1=0;index1 < oldItemSetLength;index1++) {
	    if (newElement < oldItemSet[index1]) {
		newItemSet[index1] = newElement;
		// Add rest
		for(int index2 = index1+1;index2<newItemSet.length;index2++)
				newItemSet[index2] = oldItemSet[index2-1];
		return(newItemSet);
		}
	    else newItemSet[index1] = oldItemSet[index1];
	    }

	// Add to end

	newItemSet[newItemSet.length-1] = newElement;

	// Return new item set

	return(newItemSet);
	}

    /* REALLOC 1 */

    /** Resizes given item set so that its length is increased by one
    and appends new element (identical to append method)
    @param oldItemSet the original item set
    @param newElement the new element/attribute to be appended
    @return the combined item set */

    protected short[] realloc1(short[] oldItemSet, short newElement) {

	// No old item set

	if (oldItemSet == null) {
	    short[] newItemSet = {newElement};
	    return(newItemSet);
	    }

	// Otherwise create new item set with length one greater than old
	// item set

	int oldItemSetLength = oldItemSet.length;
	short[] newItemSet = new short[oldItemSetLength+1];

	// Loop

	int index;
	for (index=0;index < oldItemSetLength;index++)
		newItemSet[index] = oldItemSet[index];
	newItemSet[index] = newElement;

	// Return new item set

	return(newItemSet);
	}

    /* REALLOC 2 */

    /** Resizes given array so that its length is increased by one element
    and new element added to front
    @param oldItemSet the original item set
    @param newElement the new element/attribute to be appended
    @return the combined item set */

    protected short[] realloc2(short[] oldItemSet, short newElement) {

	// No old array

	if (oldItemSet == null) {
	    short[] newItemSet = {newElement};
	    return(newItemSet);
	    }

	// Otherwise create new array with length one greater than old array

	int oldItemSetLength = oldItemSet.length;
	short[] newItemSet = new short[oldItemSetLength+1];

	// Loop

	newItemSet[0] = newElement;
	for (int index=0;index < oldItemSetLength;index++)
		newItemSet[index+1] = oldItemSet[index];

	// Return new array

	return(newItemSet);
	}
	
    /* --------------------------------------------- */
    /*                                               */
    /*            ITEM SET DELETE METHODS            */
    /*                                               */
    /* --------------------------------------------- */

    /* REMOVE ELEMENT N */
    
    /** Removes the nth element/attribute from the given item set.
    @param oldItemSet the given item set.
    @param n the index of the element to be removed (first index is 0). 
    @return Revised item set with nth element removed. */
    
    protected short[] removeElementN(short [] oldItemSet, int n) {
        if (oldItemSet.length <= n) return(oldItemSet);
	else {
	    short[] newItemSet = new short[oldItemSet.length-1];
	    for (int index=0;index<n;index++) newItemSet[index] = 
	    				oldItemSet[index];
	    for (int index=n+1;index<oldItemSet.length;index++) 
	        			newItemSet[index-1] = oldItemSet[index];
	    return(newItemSet);
	    }
	}
	
    /* ---------------------------------------------------------------- */
    /*                                                                  */
    /*              METHODS TO RETURN SUBSETS OF ITEMSETS               */
    /*                                                                  */
    /* ---------------------------------------------------------------- */

    /* COMPLEMENT */
    
    /** Returns complement of first itemset with respect to second itemset.
    @param itemSet1 the first given item set.
    @param itemSet2 the second given item set.
    @return complement if <TT>itemSet1</TT> in <TT>itemSet2</TT>. */
    
    protected short[] complement(short[] itemSet1, short[] itemSet2) {
        int lengthOfComp = itemSet2.length-itemSet1.length;
	
	// Return null if no complement
	if (lengthOfComp<1) return(null);
	
	// Otherwsise define combination array and determine complement
	short[] complement  = new short[lengthOfComp];
	int complementIndex = 0;
	for(int index=0;index<itemSet2.length;index++) {
	    // Add to combination if not in first itemset
	    if (notMemberOf(itemSet2[index],itemSet1)) {
	    	complement[complementIndex] = itemSet2[index];
		complementIndex++;
		}	
	    }
	
	// Return
	return(complement);
	}

    /* --------------------------------------- */
    /*                                         */
    /*             SORT ITEM SET               */
    /*                                         */
    /* --------------------------------------- */

    /* SORT ITEM SET: Given an unordered itemSet, sort the set */

    /** Sorts an unordered item set.
    @param itemSet the given item set. */

    protected void sortItemSet(short[] itemSet) {
        short temp;
        boolean isOrdered;
        int index;

        do {
	    isOrdered = true;
            index     = 0;
            while (index < (itemSet.length-1)) {
                if (itemSet[index] <= itemSet[index+1]) index++;
	        else {
	            isOrdered=false;
                    // Swap
		    temp = itemSet[index];
	            itemSet[index] = itemSet[index+1];
                    itemSet[index+1] = temp;
	            // Increment index
		    index++;
	            }
	  	}
	    } while (isOrdered==false);
    	}  

    /* ----------------------------------------------------- */
    /*                                                       */
    /*             BOOLEAN ITEM SET METHODS ETC.             */
    /*                                                       */
    /* ----------------------------------------------------- */    
	
    /* NOT MEMBER OF */
    
    /** Checks whether a particular element/attribute identified by a 
    column number is not a member of the given item set.
    @param number the attribute identifier (column number).
    @param itemSet the given item set.
    @return true if first argument is not a member of itemSet, and false 
    otherwise */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩情涩欧美日韩视频| 国产精品私房写真福利视频| 国模少妇一区二区三区| 1区2区3区国产精品| 欧美日韩一区二区三区视频 | 亚洲午夜视频在线| 久久综合九色综合欧美就去吻| 97精品久久久久中文字幕| 日韩中文字幕麻豆| 亚洲三级电影网站| 欧美激情一二三区| 日韩欧美一区二区在线视频| 色八戒一区二区三区| 国产成人免费网站| 精彩视频一区二区| 视频在线观看一区| 亚洲综合偷拍欧美一区色| 国产精品系列在线| 久久综合成人精品亚洲另类欧美| 欧美视频中文一区二区三区在线观看| 成人污污视频在线观看| 激情综合色播激情啊| 午夜欧美电影在线观看| 亚洲精品大片www| 国产精品久久看| 中文在线资源观看网站视频免费不卡| 欧美成人一级视频| 欧美一区二区三区四区久久| 日本大香伊一区二区三区| 不卡的电影网站| 成人免费视频播放| 成人永久看片免费视频天堂| 国产一区二区h| 精品一区二区三区香蕉蜜桃 | 国产电影一区二区三区| 久久电影网站中文字幕| 日韩av成人高清| 午夜视频在线观看一区| 亚洲成人黄色小说| 亚洲高清视频的网址| 一区二区三区在线视频免费 | 国产麻豆9l精品三级站| 精品在线观看视频| 国产综合色视频| 极品少妇xxxx精品少妇偷拍| 久久成人综合网| 加勒比av一区二区| 国产精品一色哟哟哟| 国产精品资源站在线| 国产精品69毛片高清亚洲| 国产高清成人在线| 成熟亚洲日本毛茸茸凸凹| 成人激情电影免费在线观看| 不卡一卡二卡三乱码免费网站| 成人综合在线网站| 91麻豆国产自产在线观看| 色88888久久久久久影院按摩 | 99久精品国产| 色婷婷亚洲精品| 欧美精品色综合| 日韩丝袜美女视频| 国产日韩精品一区二区三区| 国产精品国产三级国产三级人妇 | 国产一区二区三区在线观看免费视频| 国产在线不卡一区| 本田岬高潮一区二区三区| 91免费看片在线观看| 欧美艳星brazzers| 精品国产一区二区亚洲人成毛片| 久久综合色婷婷| 1区2区3区欧美| 青青青伊人色综合久久| 国产资源精品在线观看| 成人一区二区三区在线观看| 色综合久久中文字幕综合网| 欧美久久高跟鞋激| 久久精品视频一区二区三区| 亚洲三级免费观看| 理论电影国产精品| 99在线视频精品| 欧美电影影音先锋| 欧美国产日韩在线观看| 亚洲午夜免费福利视频| 久久99国内精品| a级精品国产片在线观看| 欧美高清www午色夜在线视频| 久久久久成人黄色影片| 亚洲成在线观看| 国产乱人伦精品一区二区在线观看| 91丨九色丨国产丨porny| 欧美一区2区视频在线观看| 国产精品理论在线观看| 日本最新不卡在线| 99视频超级精品| 精品奇米国产一区二区三区| 一区二区三区波多野结衣在线观看| 蜜臀91精品一区二区三区 | 亚洲高清免费观看高清完整版在线观看| 日本一区中文字幕| www.性欧美| 久久先锋资源网| 午夜在线电影亚洲一区| 成人app网站| 久久一区二区三区四区| 天天综合天天综合色| 99r精品视频| 久久久天堂av| 蜜臀av一区二区在线观看| 日本韩国欧美国产| 欧美激情一区二区三区蜜桃视频| 美女在线一区二区| 欧美日韩精品一区二区| 日韩理论片网站| 国产成人亚洲综合a∨猫咪| 日韩一级在线观看| 亚洲成人av一区二区三区| 99九九99九九九视频精品| 国产亚洲成av人在线观看导航| 免费人成在线不卡| 在线播放视频一区| 亚洲一区二区3| 91麻豆.com| 综合久久综合久久| 不卡电影免费在线播放一区| 久久久久久久久久久99999| 久久精品国产99| 欧美一区二区在线免费观看| 亚洲国产一区二区a毛片| 色哟哟精品一区| 亚洲日本韩国一区| 色综合天天综合| 亚洲老妇xxxxxx| 色综合色综合色综合色综合色综合| 国产精品家庭影院| 97se亚洲国产综合自在线不卡| 欧美经典三级视频一区二区三区| 国产麻豆欧美日韩一区| 2021中文字幕一区亚洲| 久久99国内精品| 久久九九99视频| 成人高清视频免费观看| 国产蜜臀av在线一区二区三区| 国产美女视频91| 国产欧美精品一区二区色综合 | 亚洲最新在线观看| 欧美亚洲一区二区在线| 亚洲国产精品影院| 欧美日韩国产综合一区二区三区| 亚洲图片有声小说| 欧美一级黄色片| 精品一二三四区| 国产欧美日韩综合精品一区二区| 国产精品77777竹菊影视小说| 日本一区二区久久| 91老师片黄在线观看| 亚洲五月六月丁香激情| 欧美老女人在线| 国产一区三区三区| 最好看的中文字幕久久| 欧美视频中文字幕| 久久99最新地址| 国产精品婷婷午夜在线观看| 91美女在线视频| 日韩国产一区二| 久久亚洲欧美国产精品乐播 | av在线这里只有精品| 一区二区三区四区高清精品免费观看| 在线观看日韩国产| 蜜桃视频一区二区| 欧美韩日一区二区三区| 欧美色成人综合| 黄色日韩三级电影| 亚洲少妇30p| 欧美电影免费观看高清完整版在 | 久久久久99精品一区| 99re热这里只有精品免费视频| 亚洲午夜精品17c| 日韩一区二区麻豆国产| 成人小视频在线| 日韩电影在线观看一区| 国产喷白浆一区二区三区| 91成人网在线| 国产乱码精品一区二区三 | 成人免费小视频| 欧美一级欧美三级在线观看| 国产成人精品免费视频网站| 亚洲成人激情社区| 欧美国产精品专区| 欧美精品tushy高清| 成人一区在线观看| 美脚の诱脚舐め脚责91| 亚洲免费观看高清完整版在线观看熊 | 国产精品素人一区二区| 日韩一区二区三区免费看| 国产69精品一区二区亚洲孕妇| 亚洲成a天堂v人片| 亚洲欧美怡红院| 久久综合精品国产一区二区三区| 欧美色图激情小说| 成人动漫在线一区|