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

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

?? hooks.c

?? 數據挖掘中的決策樹生成的經典的see5軟件的源代碼。
?? C
?? 第 1 頁 / 共 5 頁
字號:
/*************************************************************************//*									 *//*	Source code for use with See5/C5.0 Release 2.02			 *//*	-----------------------------------------------			 *//*		      Copyright RuleQuest Research 2005			 *//*									 *//*	This code is provided "as is" without warranty of any kind,	 *//*	either express or implied.  All use is at your own risk.	 *//*									 *//*************************************************************************/#define	MAXLINEBUFFER	10000char	LineBuffer[MAXLINEBUFFER], *LBp=LineBuffer;/*************************************************************************//*									 *//*	Read a name from file f into string s, setting Delimiter.	 *//*									 *//*	- Embedded periods are permitted, but periods followed by space	 *//*	  characters act as delimiters.					 *//*	- Embedded spaces are permitted, but multiple spaces are	 *//*	  replaced by a single space.					 *//*	- Any character can be escaped by '\'.				 *//*	- The remainder of a line following '|' is ignored.		 *//*									 *//*************************************************************************/Boolean ReadName(FILE *f, String s, int n, char ColonOpt)/*      --------  */{    register char *Sp=s;    register int  c;    char	  Msg[2];    /*  Skip to first non-space character  */    while ( (c = InChar(f)) == '|' || Space(c) )    {	if ( c == '|' ) SkipComment;    }    /*  Return false if no names to read  */    if ( c == EOF )    {	Delimiter = EOF;	return false;    }    /*  Read in characters up to the next delimiter  */    while ( c != ColonOpt && c != ',' && c != '\n' && c != '|' && c != EOF )    {	if ( --n <= 0 )	{	    if ( Of ) Error(LONGNAME, "", "");	}	if ( c == '.' )	{	    if ( (c = InChar(f)) == '|' || Space(c) || c == EOF ) break;	    *Sp++ = '.';	    continue;	}	if ( c == '\\' )	{	    c = InChar(f);	}	if ( Space(c) )	{	    *Sp++ = ' ';	    while ( ( c = InChar(f) ) == ' ' || c == '\t' )		;	}	else	{	    *Sp++ = c;	    c = InChar(f);	}    }    if ( c == '|' ) SkipComment;    Delimiter = c;    /*  Special case for ':='  */    if ( Delimiter == ':' )    {	if ( *LBp == '=' )	{	    Delimiter = '=';	    LBp++;	}    }    /*  Strip trailing spaces  */    while ( Sp > s && Space(*(Sp-1)) ) Sp--;    if ( Sp == s )    {	Msg[0] = ( Space(c) ? '.' : c );	Msg[1] = '\00';	Error(MISSNAME, Fn, Msg);    }    *Sp++ = '\0';    return true;}/*************************************************************************//*									 *//*	Read names of classes, attributes and legal attribute values.	 *//*	On completion, names are stored in:				 *//*	  ClassName	-	class names				 *//*	  AttName	-	attribute names				 *//*	  AttValName	-	attribute value names			 *//*	with:								 *//*	  MaxAttVal	-	number of values for each attribute	 *//*									 *//*	Other global variables set are:					 *//*	  MaxAtt	-	maximum attribute number		 *//*	  MaxClass	-	maximum class number			 *//*									 *//*	Note:  until the number of attributes is known, the name	 *//*	       information is assembled in local arrays			 *//*									 *//*************************************************************************/void GetNames(FILE *Nf)/*   --------  */{    char	Buffer[1000]="", *EndBuff;    int		AttCeiling=100, ClassCeiling=100;    Attribute	Att;    ClassNo	c;    ErrMsgs = AttExIn = 0;    LineNo  = 0;    LBp     = LineBuffer;    *LBp    = 0;    /*  Get class names from names file.  This entry can be:	- a list of discrete values separated by commas	- the name of the discrete attribute to use as the class	- the name of a continuous attribute followed by a colon and	  a comma-separated list of thresholds used to segment it  */    ClassName = AllocZero(ClassCeiling, String);    MaxClass = ClassAtt = LabelAtt = 0;    do    {	ReadName(Nf, Buffer, 1000, ':');	if ( ++MaxClass >= ClassCeiling)	{	    ClassCeiling += 100;	    Realloc(ClassName, ClassCeiling, String);	}	ClassName[MaxClass] = strdup(Buffer);    }    while ( Delimiter == ',' );    if ( Delimiter == ':' )    {	/*  Thresholds for continuous class attribute  */	ClassThresh = Alloc(ClassCeiling, ContValue);	MaxClass = 0;	do	{	    ReadName(Nf, Buffer, 1000, ':');	    if ( ++MaxClass >= ClassCeiling)	    {		ClassCeiling += 100;		Realloc(ClassThresh, ClassCeiling, ContValue);	    }	    ClassThresh[MaxClass] = strtod(Buffer, &EndBuff);	    if ( EndBuff == Buffer || *EndBuff != '\0' )	    {		Error(BADCLASSTHRESH, Buffer, Nil);	    }	    else	    if ( MaxClass > 1 &&		 ClassThresh[MaxClass] <= ClassThresh[MaxClass-1] )	    {		Error(LEQCLASSTHRESH, Buffer, Nil);	    }	}	while ( Delimiter == ',' );    }    /*  Get attribute and attribute value names from names file  */    AttName	  = AllocZero(AttCeiling, String);    MaxAttVal	  = AllocZero(AttCeiling, DiscrValue);    AttValName	  = AllocZero(AttCeiling, String *);    SpecialStatus = AllocZero(AttCeiling, char);    AttDef	  = AllocZero(AttCeiling, Definition);    MaxAtt = 0;    while ( ReadName(Nf, Buffer, 1000, ':') )    {	if ( Delimiter != ':' && Delimiter != '=' )	{	    Error(BADATTNAME, Buffer, "");	}	/*  Check for attributes included/excluded  */	if ( ( *Buffer == 'a' || *Buffer == 'A' ) &&	     ! memcmp(Buffer+1, "ttributes ", 10) &&	     ! memcmp(Buffer+strlen(Buffer)-6, "cluded", 6) )	{	    AttExIn = ( ! memcmp(Buffer+strlen(Buffer)-8, "in", 2) ? 1 : -1 );	    if ( AttExIn == 1 )	    {		ForEach(Att, 1, MaxAtt)		{		    SpecialStatus[Att] |= SKIP;		}	    }	    while ( ReadName(Nf, Buffer, 1000, ':') )	    {		Att = Which(Buffer, AttName, 1, MaxAtt);		if ( ! Att )		{		    Error(UNKNOWNATT, Buffer, Nil);		}		else		if ( AttExIn == 1 )		{		    SpecialStatus[Att] -= SKIP;		}		else		{		    SpecialStatus[Att] |= SKIP;		}	    }	    break;	}	if ( Which(Buffer, AttName, 1, MaxAtt) > 0 )	{	    Error(DUPATTNAME, Buffer, Nil);	}	if ( ++MaxAtt >= AttCeiling )	{	    AttCeiling += 100;	    Realloc(AttName, AttCeiling, String);	    Realloc(MaxAttVal, AttCeiling, DiscrValue);	    Realloc(AttValName, AttCeiling, String *);	    Realloc(SpecialStatus, AttCeiling, char);	    Realloc(AttDef, AttCeiling, Definition);	}	AttName[MaxAtt]       = strdup(Buffer);	SpecialStatus[MaxAtt] = Nil;	AttDef[MaxAtt]        = Nil;	MaxAttVal[MaxAtt]     = 0;	if ( Delimiter == '=' )	{	    if ( MaxClass == 1 && ! strcmp(ClassName[1], AttName[MaxAtt]) )	    {		Error(BADDEF3, Nil, Nil);	    }	    ImplicitAtt(Nf);	}	else	{	    ExplicitAtt(Nf);	}    }    /*  Check whether class is one of the attributes  */    if ( MaxClass == 1 || ClassThresh )    {	/*  Class attribute must be present and must be either	    a discrete attribute or a thresholded continuous attribute  */	ClassAtt = Which(ClassName[1], AttName, 1, MaxAtt);	if ( ClassAtt <= 0 || Exclude(ClassAtt) )	{	    Error(NOTARGET, ClassName[1], "");	}	else	if ( ClassThresh &&	     ( ! Continuous(ClassAtt) ||	       StatBit(ClassAtt, DATEVAL|STIMEVAL|TSTMPVAL) ) )	{	    Error(BADCTARGET, ClassName[1], "");	}	else	if ( ! ClassThresh &&	     ( Continuous(ClassAtt) || StatBit(ClassAtt, DISCRETE) ) )	{	    Error(BADDTARGET, ClassName[1], "");	}	Free(ClassName[1]);	if ( ! ClassThresh )	{	    Free(ClassName);	    MaxClass  = MaxAttVal[ClassAtt];	    ClassName = AttValName[ClassAtt];	}	else	{	    /*  Set up class names as segments of continuous target att  */	    MaxClass++;	    Realloc(ClassName, MaxClass+1, String);	    sprintf(Buffer, "%s <= %g", AttName[ClassAtt], ClassThresh[1]);	    ClassName[1] = strdup(Buffer);	    ForEach(c, 2, MaxClass-1)	    {		sprintf(Buffer, "%g < %s <= %g",			ClassThresh[c-1], AttName[ClassAtt], ClassThresh[c]);		ClassName[c] = strdup(Buffer);	    }	    sprintf(Buffer, "%s > %g",		    AttName[ClassAtt], ClassThresh[MaxClass-1]);	    ClassName[MaxClass] = strdup(Buffer);	}    }    ClassName[0] = "?";    fclose(Nf);    if ( ErrMsgs > 0 ) Goodbye(1);}/*************************************************************************//*									 *//*	Continuous or discrete attribute				 *//*									 *//*************************************************************************/void ExplicitAtt(FILE *Nf)/*   -----------  */{    char	Buffer[1000]="", *p;    DiscrValue	v;    int		ValCeiling=100, BaseYear;    time_t	clock;    /*  Read attribute type or first discrete value  */    if ( ! ( ReadName(Nf, Buffer, 1000, ':') ) )    {	Error(EOFINATT, AttName[MaxAtt], "");    }    MaxAttVal[MaxAtt] = 0;    if ( Delimiter != ',' )    {	/*  Typed attribute  */	if ( ! strcmp(Buffer, "continuous") )	{	}	else	if ( ! strcmp(Buffer, "timestamp") )	{	    SpecialStatus[MaxAtt] = TSTMPVAL;	    /*  Set the base date if not done already  */	    if ( ! TSBase )	    {		clock = time(0);		BaseYear = gmtime(&clock)->tm_year + 1900;		SetTSBase(BaseYear);	    }	}	else	if ( ! strcmp(Buffer, "date") )	{	    SpecialStatus[MaxAtt] = DATEVAL;	}	else	if ( ! strcmp(Buffer, "time") )	{	    SpecialStatus[MaxAtt] = STIMEVAL;	}	else	if ( ! memcmp(Buffer, "discrete", 8) )	{	    SpecialStatus[MaxAtt] = DISCRETE;	    /*  Read max values and reserve space  */	    v = atoi(&Buffer[8]);	    if ( v < 2 )	    {		Error(BADDISCRETE, AttName[MaxAtt], "");	    }	    AttValName[MaxAtt] = Alloc(v+3, String);	    AttValName[MaxAtt][0] = (char *) (long) v+1;	    AttValName[MaxAtt][(MaxAttVal[MaxAtt]=1)] = strdup("N/A");	}	else	if ( ! strcmp(Buffer, "ignore") )	{	    SpecialStatus[MaxAtt] = EXCLUDE;	}	else	if ( ! strcmp(Buffer, "label") )	{	    LabelAtt = MaxAtt;	    SpecialStatus[MaxAtt] = EXCLUDE;	}	else	{	    /*  Cannot have only one discrete value for an attribute  */	    Error(SINGLEATTVAL, AttName[MaxAtt], Buffer);	}    }    else    {	/*  Discrete attribute with explicit values  */	AttValName[MaxAtt] = AllocZero(ValCeiling, String);	/*  Add "N/A" unless this attribute is the class  */	if ( MaxClass > 1 || strcmp(ClassName[1], AttName[MaxAtt]) )	{	    AttValName[MaxAtt][(MaxAttVal[MaxAtt]=1)] = strdup("N/A");	}	else	{	    MaxAttVal[MaxAtt] = 0;	}	p = Buffer;	/*  Special check for ordered attribute  */	if ( ! memcmp(Buffer, "[ordered]", 9) )	{	    SpecialStatus[MaxAtt] = ORDERED;	    for ( p = Buffer+9 ; Space(*p) ; p++ )		;	}	/*  Record first real explicit value  */	AttValName[MaxAtt][++MaxAttVal[MaxAtt]] = strdup(p);	/*  Record remaining values  */	do	{	    if ( ! ( ReadName(Nf, Buffer, 1000, ':') ) )	    {		Error(EOFINATT, AttName[MaxAtt], "");	    }	    if ( ++MaxAttVal[MaxAtt] >= ValCeiling )	    {		ValCeiling += 100;		Realloc(AttValName[MaxAtt], ValCeiling, String);	    }	    AttValName[MaxAtt][MaxAttVal[MaxAtt]] = strdup(Buffer);	}	while ( Delimiter == ',' );	/*  Cancel ordered status if <3 real values  */	if ( Ordered(MaxAtt) && MaxAttVal[MaxAtt] <= 3 )	{	    SpecialStatus[MaxAtt] = 0;	}    }}/*************************************************************************//*									 *//*	Locate value Val in List[First] to List[Last]			 *//*									 *//*************************************************************************/int Which(String Val, String *List, int First, int Last)/*  -----  */{    int	n=First;    while ( n <= Last && strcmp(Val, List[n]) ) n++;    return ( n <= Last ? n : First-1 );}/*************************************************************************//*									 *//*	Read next char keeping track of line numbers			 *//*									 *//*************************************************************************/int InChar(FILE *f)/*  ------  */{    if ( ! *LBp )    {	LBp = LineBuffer;	if ( ! fgets(LineBuffer, MAXLINEBUFFER, f) )	{	    LineBuffer[0] = '\00';	    return EOF;	}	LineNo++;    }	    return (int) *LBp++;}/*************************************************************************//*									 *//*  Read a raw case description from file Df.				 *//*									 *//*  For each attribute, read the attribute value from the file.		 *//*  If it is a discrete valued attribute, find the associated no.	 *//*  of this attribute value (if the value is unknown this is 0).	 *//*									 *//*  Returns the Description of the case (i.e. the array of		 *//*  attribute values).							 *//*									 *//*************************************************************************/#define XError(a,b,c)	Error(a,b,c)Description GetDescription(FILE *Df, Boolean Train)/*          --------------  */{    Attribute	Att;    char	Name[1000], *EndName;    int		Dv;    Description	Dummy, DVec;    ContValue	Cv;    Boolean	FirstValue=true;#if defined WIN32  && ! defined _CONSOLE     extern int	XREF;#endif    if ( ReadName(Df, Name, 1000, '\00') )    {	Dummy = AllocZero(MaxAtt+2, AttValue);	DVec = &Dummy[1];	ForEach(Att, 1, MaxAtt)	{	    if ( AttDef[Att] )	    {		DVec[Att] = EvaluateDef(AttDef[Att], DVec);		if ( Continuous(Att) )		{		    CheckValue(DVec, Att);		}		if ( SomeMiss )		{		    SomeMiss[Att] |= Unknown(DVec, Att);		    SomeNA[Att]   |= NotApplic(DVec, Att);		}		continue;	    }	    /*  Get the attribute value if don't already have it  */	    if ( ! FirstValue && ! ReadName(Df, Name, 1000, '\00') )	    {		XError(HITEOF, AttName[Att], "");		FreeLastCase(DVec);		return Nil;	    }	    FirstValue = false;	    if ( Exclude(Att) )	    {#if defined WIN32 && ! defined _CONSOLE		if ( XREF || Att == LabelAtt )#else		if ( Att == LabelAtt )#endif		{		    /*  Record the value as a string  */		    SVal(DVec,Att) = StoreIVal(Name);		}	    }	    else	    if ( ! strcmp(Name, "?") )	    {		/*  Set marker to indicate missing value  */		DVal(DVec, Att) = UNKNOWN;		if ( SomeMiss ) SomeMiss[Att] = true;	    }	    else	    if ( Att != ClassAtt && ! strcmp(Name, "N/A") )	    {		/*  Set marker to indicate not applicable  */		DVal(DVec, Att) = NA;		if ( SomeNA ) SomeNA[Att] = true;	    }	    else	    if ( Discrete(Att) )	    {		/*  Discrete attribute  */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美女mm1313爽爽久久久蜜臀| 精品国产3级a| 欧美变态口味重另类| 中文字幕一区二区5566日韩| 奇米色一区二区三区四区| 97aⅴ精品视频一二三区| 日韩欧美在线一区二区三区| 一区在线观看视频| 国产在线精品视频| 欧美年轻男男videosbes| 中文字幕av资源一区| 麻豆极品一区二区三区| 欧美在线一区二区| 亚洲美女电影在线| 国产精品18久久久久久久久| 欧美一级久久久| 天堂av在线一区| 欧美午夜一区二区| 亚洲免费视频成人| 成av人片一区二区| 国产亚洲福利社区一区| 精品一区二区三区免费观看| 日韩欧美国产三级电影视频| 亚洲午夜激情av| 欧美亚洲综合网| 亚洲精品第一国产综合野| av中文字幕不卡| 中文字幕一区二区三区在线播放| 成人免费观看视频| 国产精品大尺度| 波多野结衣的一区二区三区| 国产精品久久久久aaaa| 成人18视频日本| 亚洲精选免费视频| 欧美亚洲免费在线一区| 亚洲高清不卡在线| 欧美久久久久久久久中文字幕| 亚洲国产欧美在线| 欧美一级电影网站| 国产精品18久久久久久vr| 国产欧美日韩综合| 99久久精品国产毛片| 亚洲精品视频在线| 欧美日韩午夜影院| 免费观看日韩av| 久久精品人人做人人爽人人| 成人爱爱电影网址| 一卡二卡三卡日韩欧美| 欧美日本精品一区二区三区| 麻豆国产91在线播放| 久久女同互慰一区二区三区| 成人激情小说网站| 亚洲午夜电影网| 精品国产成人系列| av成人免费在线| 午夜精品久久久久久久久久| 日韩欧美国产wwwww| 国产大陆a不卡| 亚洲影院免费观看| 精品欧美一区二区在线观看| 成人高清在线视频| 亚洲成a人v欧美综合天堂下载| 欧美一区二区女人| 成人美女在线视频| 视频一区在线播放| 中文字幕av不卡| 9191国产精品| 成人av午夜影院| 日韩国产一二三区| 国产精品国产自产拍高清av| 91麻豆精品91久久久久久清纯| 国产成人三级在线观看| 亚洲成人在线网站| 亚洲国产高清在线| 日韩三级在线观看| 色悠悠久久综合| 国产精品自拍av| 日本中文在线一区| 亚洲激情男女视频| 欧美国产丝袜视频| 欧美一级理论片| 在线观看中文字幕不卡| 国产精品888| 蜜桃av一区二区| 夜夜揉揉日日人人青青一国产精品| 精品动漫一区二区三区在线观看| 色伊人久久综合中文字幕| 黄色精品一二区| 香蕉成人啪国产精品视频综合网 | 欧美日韩国产综合久久| 国产精品一卡二卡在线观看| 日韩电影在线观看一区| 一区二区高清在线| 亚洲视频网在线直播| 国产欧美日韩精品a在线观看| 欧美成人一区二区三区片免费 | 亚洲欧洲综合另类| 国产欧美日韩亚州综合| 亚洲精品在线观看视频| 成人一区二区三区| 欧美二区在线观看| 91免费在线播放| 国产电影一区在线| 韩国精品在线观看| 蜜臀av一区二区在线观看| 亚洲第一搞黄网站| 亚洲午夜私人影院| 亚洲综合一区二区精品导航| 亚洲日本一区二区| 中文字幕欧美一| 1024亚洲合集| 18成人在线视频| 一区二区三区小说| 亚洲一区二区三区四区中文字幕| 亚洲欧美国产高清| 亚洲午夜一区二区三区| 亚洲国产cao| 日产国产高清一区二区三区| 天天亚洲美女在线视频| 男女男精品网站| 久久国产三级精品| 国内精品视频一区二区三区八戒| 久久精品理论片| 国产成人在线免费观看| 国产成人av资源| 99精品视频在线播放观看| 91精品福利在线| 欧美日韩视频在线观看一区二区三区| 欧美日本国产一区| 精品久久久久久亚洲综合网| 久久精品日韩一区二区三区| 中文字幕亚洲在| 一区二区三区日韩欧美精品| 日韩—二三区免费观看av| 精品一区二区三区香蕉蜜桃| 成人毛片在线观看| 欧美日韩一区在线观看| 日韩久久精品一区| 中文字幕一区二区视频| 亚洲一区成人在线| 乱中年女人伦av一区二区| 国产成人av电影在线播放| 一本久久a久久免费精品不卡| 欧美专区在线观看一区| 日韩精品中午字幕| 亚洲欧洲国产日本综合| 婷婷一区二区三区| 福利电影一区二区| 欧美三级在线看| 精品国产91亚洲一区二区三区婷婷| 国产精品理论片在线观看| 一个色在线综合| 国产精品66部| 8x福利精品第一导航| 欧美国产欧美综合| 丝袜诱惑亚洲看片| av不卡免费电影| 精品少妇一区二区三区免费观看| 亚洲欧洲日韩一区二区三区| 美腿丝袜在线亚洲一区| 色老汉av一区二区三区| 久久久精品tv| 男男视频亚洲欧美| 91久久久免费一区二区| 久久久无码精品亚洲日韩按摩| 亚洲午夜精品久久久久久久久| 国产成人三级在线观看| 91精品国产福利在线观看| 中文字幕综合网| 国产九九视频一区二区三区| 欧美久久免费观看| 亚洲色图欧洲色图婷婷| 国产成人精品免费网站| 日韩欧美激情四射| 亚洲韩国一区二区三区| 成人av在线看| 久久亚洲一区二区三区明星换脸| 亚洲成人中文在线| 在线欧美一区二区| 亚洲特黄一级片| 成人动漫中文字幕| 国产日本一区二区| 国产精品资源网站| 欧美成人女星排行榜| 日本视频一区二区| 91麻豆精品国产无毒不卡在线观看| 一区二区在线观看视频| 91在线看国产| 亚洲人成影院在线观看| 99久久久国产精品| 欧美国产成人精品| 国产成人精品一区二区三区四区| 26uuuu精品一区二区| 国内精品久久久久影院一蜜桃| 欧美一区二区网站| 美腿丝袜亚洲一区| 精品久久久久久久久久久久久久久| 日韩电影一区二区三区| 欧美一区二区啪啪| 极品瑜伽女神91|