42 #define XError(a,b,c) if (! SuppressErrorMessages) Error(a,b,c)
62 CaseNo CaseSpace, WantTrain, LeftTrain, WantTest, LeftTest;
63 Boolean FirstIgnore=
true, SelectTrain;
70 if ( Train || !
Case )
106 SelectTrain =
KRandom() < WantTrain / (float) LeftTrain--;
119 if ( SelectTrain != Train ||
120 ( ! Train && AltRandom >= WantTest / (
float) LeftTest-- ) )
142 if ( AllowUnknownClass || (
Class(DVec) & 077777777) > 0 )
149 if ( FirstIgnore &&
Of )
151 fprintf(
Of, T_IgnoreBadClass);
184 char Name[1000], *EndName;
191 if (
ReadName(Df, Name, 1000,
'\00') )
216 if ( ! FirstValue && !
ReadName(Df, Name, 1000,
'\00') )
234 if ( ! strcmp(Name,
"?") )
242 if ( Att !=
ClassAtt && ! strcmp(Name,
"N/A") )
293 DVal(DVec, Att) = Dv;
330 CVal(DVec, Att) = strtod(Name, &EndName);
331 if ( EndName == Name || *EndName !=
'\0' )
359 for ( Dv = 1 ; Dv < MaxClass && Cv >
ClassThresh[Dv] ; Dv++ )
367 if ( !
ReadName(Df, Name, 1000,
'\00') )
410 if ( (Next = getc(Df)) == EOF )
412 if ( Last !=
',' ) Count++;
419 while ( (Next = getc(Df)) !=
'\n' )
425 if ( Last !=
',' ) Count++;
436 if ( Next !=
'\t' && Next !=
' ' )
514 Cv =
CVal(DVec, Att);