mageec  0.1.0
MAchine Guided Energy Efficient Compilation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
classify-global.c
Go to the documentation of this file.
1 /*************************************************************************/
2 /* */
3 /* Source code for use with See5/C5.0 Release 2.10 */
4 /* ----------------------------------------------- */
5 /* Copyright RuleQuest Research 2013 */
6 /* */
7 /* This code is provided "as is" without warranty of any kind, */
8 /* either express or implied. All use is at your own risk. */
9 /* */
10 /*************************************************************************/
11 
12 
13 /*************************************************************************/
14 /* */
15 /* Parameters etc */
16 /* */
17 /*************************************************************************/
18 
19 int TRIALS=1, /* number of trees to be grown */
20  Trial; /* trial number for boosting */
21 
22 Boolean RULES=0, /* rule-based classifiers */
23  RULESUSED=0; /* list applicable rules */
24 
25 
26 /*************************************************************************/
27 /* */
28 /* Attributes and data */
29 /* */
30 /*************************************************************************/
31 
32 Attribute ClassAtt=0, /* attribute to use as class */
33  LabelAtt, /* attribute to use as case ID */
34  CWtAtt; /* attribute to use for case weight */
35 
36 String *ClassName=0, /* class names */
37  *AttName=0, /* att names */
38  **AttValName=0; /* att value names */
39 
40 char *IgnoredVals=0; /* values of labels and atts marked ignore */
41 int IValsSize=0, /* size of above */
42  IValsOffset=0; /* index of first free char */
43 
44 int MaxAtt, /* max att number */
45  MaxClass=0, /* max class number */
46  AttExIn=0, /* attribute exclusions/inclusions */
47  LineNo=0, /* input line number */
48  ErrMsgs=0, /* errors found */
49  Delimiter, /* character at end of name */
50  TSBase=0; /* base day for time stamps */
51 
52 DiscrValue *MaxAttVal=0; /* number of values for each att */
53 
54 ContValue *ClassThresh=0; /* thresholded class attribute */
55 
56 char *SpecialStatus=0;/* special att treatment */
57 
58 Definition *AttDef=0; /* definitions of implicit atts */
59 
60 Boolean *SomeMiss=Nil, /* att has missing values */
61  *SomeNA=Nil; /* att has N/A values */
62 
63 String FileStem="undefined";
64 
65 /*************************************************************************/
66 /* */
67 /* Classification environment */
68 /* */
69 /*************************************************************************/
70 
71 CEnvRec *GCEnv; /* used by classification routines */
72 
73 /*************************************************************************/
74 /* */
75 /* Trees */
76 /* */
77 /*************************************************************************/
78 
79 Tree *Pruned=0; /* decision trees */
80 
81 ClassNo *TrialPred=0; /* predictions for each boost trial */
82 
83 float **MCost=0; /* misclass cost [pred][real] */
84 
85 /*************************************************************************/
86 /* */
87 /* Rules */
88 /* */
89 /*************************************************************************/
90 
91 
92 CRuleSet *RuleSet=0; /* rulesets */
93 
94 ClassNo Default; /* default class associated with ruleset or
95  boosted classifier */
96 
97 
98 /*************************************************************************/
99 /* */
100 /* Misc */
101 /* */
102 /*************************************************************************/
103 
104 FILE *TRf=0; /* file pointer for tree and rule i/o */
105 char Fn[500]; /* file name */