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

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

?? subset.c

?? 決策樹是用二叉樹形圖來表示處理邏輯的一種工具。可以直觀、清晰地表達加工的邏輯要求。特別適合于判斷因素比較少、邏輯組合關系不復雜的情況。
?? C
字號:
/*************************************************************************//*									 *//*      Evaluation of the subsetting of a discrete attribute		 *//*      ----------------------------------------------------		 *//*									 *//*************************************************************************/#include "buildex.i"ItemCount	*Slice1,	/* Slice1[c]    = saved values of Freq[x][c] in subset.c */	*Slice2;	/* Slice2[c]    = saved values of Freq[y][c] */Set	**Subset;	/* Subset[a][s] = subset s for att a */short	*Subsets;	/* Subsets[a] = no. subsets for att a *//*************************************************************************//*									 *//*  Evaluate subsetting a discrete attribute and form the chosen	 *//*  subsets Subset[Att][], setting Subsets[Att] to the number of	 *//*  subsets, and the Info[] and Gain[] of a test on the attribute	 *//*									 *//*************************************************************************/    EvalSubset(Att, Fp, Lp, Items)/*  ----------  */     Attribute Att;    ItemNo Fp, Lp;     ItemCount Items;{     DiscrValue V1, V2, BestV1, BestV2, Barred;    ItemCount KnownItems;    ClassNo c;    float BaseInfo, MinGain, ThisGain, ThisInfo,	Val, BestVal, BestGain, BestInfo,	PrevVal, PrevGain, PrevInfo,	DiscrKnownBaseInfo(), Worth(), ComputeGain(), TotalInfo();    short Blocks=0, MissingValues=0, ReasonableSubsets, Bytes, b;    Boolean MergedSubsets = false;    int SaveMINOBJS;    SaveMINOBJS = MINOBJS;    MINOBJS = 1;    /*  First compute Freq[][], ValFreq[], base info, and the gain	and total info of a split on discrete attribute Att  */    ComputeFrequencies(Att, Fp, Lp);    KnownItems = Items - ValFreq[0];    if ( KnownItems < Epsilon )    {	Verbosity(2) printf("\tAtt %s: no known values\n", AttName[Att]);	Gain[Att] = -Epsilon;	Info[Att] = 0;	return;    }    BaseInfo = DiscrKnownBaseInfo(KnownItems, MaxAttVal[Att]);    PrevGain = ComputeGain(BaseInfo, UnknownRate[Att], MaxAttVal[Att],KnownItems);    PrevInfo = TotalInfo(ValFreq, 0, MaxAttVal[Att]) / Items;    PrevVal = Worth(PrevInfo, PrevGain, Epsilon);    Verbosity(2)    {	printf("\tAtt %s", AttName[Att]);	Verbosity(3) PrintDistribution(Att, MaxAttVal[Att], true);	printf("\tinf %.3f, gain %.3f, val=%.3f\n",		PrevInfo, PrevGain, PrevVal);    }    /*  Eliminate unrepresented attribute values from Freq[] and ValFreq[]	and form a separate subset for each represented attribute value  */    Bytes = (MaxAttVal[Att]>>3) + 1;    ClearBits(Bytes, Subset[Att][0]);    ForEach(V1, 1, MaxAttVal[Att])    {	if ( ValFreq[V1] > 0.5 )	{	    if ( ++Blocks < V1 )	    {		ValFreq[Blocks] = ValFreq[V1];		ForEach(c, 0, MaxClass)		{		    Freq[Blocks][c] = Freq[V1][c];		}	    }	    ClearBits(Bytes, Subset[Att][Blocks]);	    SetBit(V1, Subset[Att][Blocks]);	}	else	{	    SetBit(V1, Subset[Att][0]);	    MissingValues++;	}    }    /*  Merge any single-class subsets with others of the same class  */    /*  Note: have ValFreq[V] > 0 for all V  */    ForEach(V1, 1, Blocks-1)    {	for ( c = 0 ; Freq[V1][c] < 0.1 ; c++ )	    ;	if ( Freq[V1][c] < ValFreq[V1] - 0.1 ) continue;	/*  Now have a single class -- look for others  */	for ( V2 = V1+1 ; V2 <= Blocks ; )	{	    if ( Freq[V2][c] < ValFreq[V2] - 0.1 )	    {		V2++;	    }	    else	    {		/*  Merge these subsets  */		Combine(V1, V2, Blocks);		ForEach(b, 0, Bytes-1)		{		    Subset[Att][V1][b] |= Subset[Att][V2][b];		    Subset[Att][V2][b] = Subset[Att][Blocks][b];		}		Blocks--;		MergedSubsets = true;	    }	}    }    if ( MergedSubsets )    {	PrevGain = ComputeGain(BaseInfo, UnknownRate[Att], Blocks, KnownItems);	PrevInfo = TotalInfo(ValFreq, 0, Blocks) / Items;	PrevVal = Worth(PrevInfo, PrevGain, Epsilon);	Verbosity(2)	{	    printf("\tAfter merging single-class subsets:");	    Verbosity(3) PrintDistribution(Att, Blocks, false);	    printf("\tinf %.3f, gain %.3f, val=%.3f\n",		    PrevInfo, PrevGain, PrevVal);	}    }    /*  Examine possible pair mergers and hill-climb  */    MinGain = PrevGain / 2;    while ( Blocks > 2 )    {	BestVal = BestV1 = 0;	BestGain = -Epsilon;	/*  Check reasonable subsets; if less than 3, bar mergers	    involving the largest block  */	ReasonableSubsets = 0;	Barred = 1;	ForEach(V1, 1, Blocks)	{	    if ( ValFreq[V1] >= SaveMINOBJS ) ReasonableSubsets++;	    if ( ValFreq[V1] > ValFreq[Barred] ) Barred = V1;	}	if ( ReasonableSubsets >= 3 ) Barred = 0;	/*  For each possible pair of values, calculate the gain and	    total info of a split in which they are treated as one.	    Keep track of the pair with the best gain.  */	ForEach(V1, 1, Blocks-1)	{	    ForEach(V2, V1+1, Blocks)	    {		if ( V1 == Barred || V2 == Barred ) continue;		Combine(V1, V2, Blocks);		ThisGain = ComputeGain(BaseInfo, UnknownRate[Att],					Blocks-1, KnownItems);		ThisInfo = TotalInfo(ValFreq, 0, Blocks-1) / Items;		Val      = Worth(ThisInfo, ThisGain, Epsilon);		Verbosity(4)		{		    printf("\tcombine %d %d info %.3f gain %.3f val %.3f",		           V1, V2, ThisInfo, ThisGain, Val);		    PrintDistribution(Att, Blocks-1, false);		}		/*  Force a split if			less than two reasonable subsets, or			using GAIN criterion		    Prefer this split to the previous one if			gain >= MinGain (and previous < MinGain), or			val >= previous best val  */		if ( ThisGain >= MinGain && BestGain < MinGain ||		     Val >= BestVal ||		     ! BestV1 && ( ! GAINRATIO || ReasonableSubsets < 2 ) )		{		    BestVal  = Val;		    BestGain = ThisGain;		    BestInfo = ThisInfo;		    BestV1   = V1;		    BestV2   = V2;		}		Uncombine(V1, V2);	    }	}	if ( GAINRATIO &&	     ReasonableSubsets >= 2 &&	     ( ! BestV1 ||	       BestVal < PrevVal + 1E-5 ||	       BestVal == PrevVal && BestGain < PrevGain ) ) break;	PrevGain = BestGain;	PrevInfo = BestInfo;        PrevVal = BestVal;	Combine(BestV1, BestV2, Blocks);	ForEach(b, 0, Bytes-1)	{	    Subset[Att][BestV1][b] |= Subset[Att][BestV2][b];	    Subset[Att][BestV2][b] = Subset[Att][Blocks][b];	}	Blocks--;	Verbosity(2)	{	    printf("\t\tform subset ");	    PrintSubset(Att, Subset[Att][BestV1]);	    printf(": %d subsets, inf %.3f, gain %.3f, val %.3f\n",		   Blocks, BestInfo, BestGain, BestVal);	    Verbosity(3)	    {		printf("\t\tcombine %d, %d", BestV1, BestV2);		PrintDistribution(Att, Blocks, false);	    }	}    }    MINOBJS = SaveMINOBJS;    if ( PrevVal <= 0 )    {	Gain[Att] = -Epsilon;	Info[Att] = 0;    }    else    {	Gain[Att] = ComputeGain(BaseInfo, UnknownRate[Att], Blocks, KnownItems);	Info[Att] = PrevInfo;	if ( MissingValues )	{	    Blocks++;	    CopyBits(Bytes, Subset[Att][0], Subset[Att][Blocks]);	}	Subsets[Att] = Blocks;	Verbosity(2) printf("\tFinal subsets:");	Verbosity(3) PrintDistribution(Att, Blocks, false);	Verbosity(2)	    printf("\tinf %.3f gain %.3f val %.3f\n", 		   Info[Att], Gain[Att], Worth(Info[Att], Gain[Att], Epsilon));    }}/*************************************************************************//*									 *//*  Combine the distribution figures of discrete attribute values	 *//*  x and y, putting the combined figures in Freq[x][] and		 *//*  ValFreq[x][], and saving old values in Slice1 and Slice2		 *//*									 *//*************************************************************************/    Combine(x, y, Last)/*  -------  */    DiscrValue x, y, Last;{    ClassNo c;    ForEach(c, 0, MaxClass)    {	Slice1[c] = Freq[x][c];	Slice2[c] = Freq[y][c];	Freq[x][c] += Freq[y][c];	Freq[y][c]  = Freq[Last][c];    }    Slice1[MaxClass+1] = ValFreq[x];    Slice2[MaxClass+1] = ValFreq[y];    ValFreq[x] += ValFreq[y];    ValFreq[y]  = ValFreq[Last];}/*************************************************************************//*									 *//*  Restore old class distribution figures of discrete attribute	 *//*  values x and y from Slice1 and Slice2				 *//*									 *//*************************************************************************/    Uncombine(x, y)/*  ---------  */    DiscrValue x, y;{    ClassNo c;    ForEach(c, 0, MaxClass)    {	Freq[x][c] = Slice1[c];	Freq[y][c] = Slice2[c];    }    ValFreq[x] = Slice1[MaxClass+1];    ValFreq[y] = Slice2[MaxClass+1];}/*************************************************************************//*									 *//*  Print the values of attribute Att which are in the subset Ss	 *//*									 *//*************************************************************************/    PrintSubset(Att, Ss)/*  -----------  */    Attribute Att;    Set Ss;{    DiscrValue V1;    Boolean First=true;    ForEach(V1, 1, MaxAttVal[Att])    {	if ( In(V1, Ss) )	{	    if ( First )	    {		First = false;	    }	    else	    {		printf(", ");	    }	    printf("%s", AttValName[Att][V1]);	}    }}/*************************************************************************//*									 *//*  Construct and return a node for a test on a subset of values	 *//*									 *//*************************************************************************/    SubsetTest(Node, Att)/*  -----------  */    Tree Node;    Attribute Att;{     ItemCount CountItems();    short S, Bytes;    Sprout(Node, Subsets[Att]);    Node->NodeType	= BrSubset;    Node->Tested	= Att;    Node->Errors	= 0;        Bytes = (MaxAttVal[Att]>>3) + 1;    Node->Subset = (Set *) calloc(Subsets[Att] + 1, sizeof(Set));    ForEach(S, 1, Node->Forks)    {	Node->Subset[S] = (Set) malloc(Bytes);	CopyBits(Bytes, Subset[Att][S], Node->Subset[S]);    }} 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲图片自拍偷拍| 午夜日韩在线电影| 欧美美女喷水视频| 高清不卡在线观看| 国产成人精品亚洲777人妖 | 国产亚洲女人久久久久毛片| 国产成人精品1024| 日本不卡的三区四区五区| 亚洲精品日韩专区silk| 日韩精品一区二区三区四区| 成人av电影在线网| 国产成人精品免费在线| 麻豆国产精品官网| 亚洲综合一区在线| 亚洲欧美激情插| 亚洲综合激情小说| 91成人国产精品| 欧美伊人精品成人久久综合97 | 91麻豆精品视频| 国产成人在线视频免费播放| 蜜臀av性久久久久av蜜臀妖精| 亚洲综合免费观看高清完整版| 中文字幕在线不卡| 日韩理论在线观看| 一区二区三区在线高清| 亚洲一区二区不卡免费| 亚洲午夜在线视频| 美洲天堂一区二卡三卡四卡视频| 日韩一区欧美二区| 激情综合网最新| 成人av电影免费观看| 91麻豆精东视频| 欧美一级在线视频| 国产午夜精品一区二区| 亚洲人成7777| 蜜臀av亚洲一区中文字幕| 国产黄色91视频| 色伊人久久综合中文字幕| 91精品国产综合久久蜜臀 | 国产综合一区二区| eeuss鲁片一区二区三区在线看| 色天使久久综合网天天| 91精品婷婷国产综合久久性色| 久久久www成人免费毛片麻豆| 亚洲图片另类小说| 久久精品国产99久久6| 国产精品亚洲第一区在线暖暖韩国 | 国产成人精品免费一区二区| 色哟哟欧美精品| 国产午夜精品美女毛片视频| 午夜精品福利一区二区三区蜜桃| 国产精品1区2区| 欧美亚洲日本一区| 亚洲国产精品激情在线观看| 午夜欧美2019年伦理| 成人高清视频免费观看| 久久亚洲捆绑美女| 日韩专区在线视频| 欧美中文字幕一区二区三区亚洲 | 懂色av中文字幕一区二区三区| 欧美系列亚洲系列| 亚洲三级小视频| yourporn久久国产精品| 久久蜜臀中文字幕| 日韩**一区毛片| 欧美久久久一区| 日韩在线一二三区| 宅男在线国产精品| 日本vs亚洲vs韩国一区三区 | 国产无人区一区二区三区| 裸体健美xxxx欧美裸体表演| 亚洲欧洲美洲综合色网| 成人免费黄色大片| 国产精品不卡一区| 日本精品视频一区二区三区| 中文字幕在线观看一区二区| 成a人片国产精品| 亚洲欧美日本韩国| 欧美性猛交xxxx黑人交| 午夜影视日本亚洲欧洲精品| 欧美高清视频在线高清观看mv色露露十八 | 日韩一区二区免费电影| 卡一卡二国产精品 | 视频一区视频二区中文字幕| 欧美日韩卡一卡二| 久久国产精品99精品国产| 国产性天天综合网| 欧美专区日韩专区| 久久不见久久见免费视频1| 精品播放一区二区| 色噜噜狠狠一区二区三区果冻| 一区二区不卡在线播放| 日韩欧美在线一区二区三区| 国产精品一区免费在线观看| 中文字幕一区二区三区不卡在线| 色呦呦国产精品| 国产精品一二三| 午夜在线成人av| 中文字幕亚洲在| 精品国产凹凸成av人导航| 92精品国产成人观看免费| 日韩av电影天堂| 一区二区三区在线视频观看| 日韩欧美国产成人一区二区| bt欧美亚洲午夜电影天堂| 美女www一区二区| 亚洲在线免费播放| 国产精品国产三级国产普通话蜜臀| 欧美情侣在线播放| 色综合久久88色综合天天| 国产精品77777竹菊影视小说| 亚洲国产成人精品视频| 成人免费在线播放视频| 欧美大片在线观看一区二区| 欧美在线视频全部完| 一本色道久久综合狠狠躁的推荐| 国产精品一卡二| 国产在线日韩欧美| 国产精品白丝jk黑袜喷水| 激情久久五月天| 韩国精品在线观看| 国产精品一区二区免费不卡| 免费在线观看成人| 老汉av免费一区二区三区| 日韩成人免费看| 久久黄色级2电影| 韩国一区二区三区| 国产成人精品亚洲日本在线桃色| 国产伦精一区二区三区| 国产盗摄一区二区三区| 国产精品影音先锋| 99视频精品全部免费在线| 成人av电影免费在线播放| 色综合欧美在线| 欧美老女人在线| 国产亚洲成年网址在线观看| 综合av第一页| 午夜久久久影院| 精彩视频一区二区| aaa国产一区| 51午夜精品国产| 久久精品一区二区三区不卡| 国产精品不卡在线观看| 亚洲国产另类av| 懂色av中文一区二区三区| 欧美日韩一卡二卡三卡| 欧美激情一区在线观看| 亚洲国产精品久久不卡毛片 | 色狠狠一区二区三区香蕉| 欧美一区二区三区视频在线观看| 精品欧美一区二区久久| 亚洲日本韩国一区| 精品一区二区在线免费观看| 色先锋aa成人| 久久久久国色av免费看影院| 五月天一区二区| av中文字幕不卡| 精品电影一区二区| 日韩精品五月天| 欧美三级日韩在线| 国产精品乱码一区二三区小蝌蚪| 天天色天天爱天天射综合| 成人午夜av影视| 久久影院午夜论| 韩国成人精品a∨在线观看| 3751色影院一区二区三区| 一区二区日韩av| 在线一区二区三区| 亚洲免费观看高清完整| aaa国产一区| 中文字幕一区在线观看| 成人精品一区二区三区中文字幕| 久久日一线二线三线suv| 精品在线播放免费| 精品国产a毛片| 国产伦精品一区二区三区免费迷| 日韩一区二区三区视频在线| 婷婷成人激情在线网| 欧美美女bb生活片| 美女网站一区二区| 日韩欧美国产精品一区| 国产综合色精品一区二区三区| 久久综合中文字幕| 国产精品一二一区| 亚洲欧洲色图综合| 欧美性做爰猛烈叫床潮| 午夜精品视频一区| 精品久久久久久亚洲综合网| 高清在线不卡av| 亚洲高清在线视频| 久久综合色8888| 91视频国产资源| 日韩精品一二三区| 国产亚洲精品久| 在线视频一区二区三区| 免费成人在线观看| 亚洲欧美日韩在线不卡| 在线播放欧美女士性生活| 国产在线不卡一区| 亚洲永久精品国产|