|
Algorithm 2: The Classifier Build Algorithm |
Definition:
Let RuleSet denote the set of extracted CARs, and the ith CAR in RuleSet is denoted as ri.
Let D denote the dataset, and the ith case in D is denoted as di.
|
Input:
The RuleSet
The dataset D.
|
Output:
The CAR-Classifier, which is denoted as C.
The default class, which is denoted as DClass.
|
| 1, RuleSet=sort(RuleSet) |
| 2, for(i=1; i<RuleSet.size(); i++) do
|
| 3, temp = Ø; |
| 4, for(j=1; j<D.size(), j++) do
|
| 5, if
dj is correctly classified by ri
then
|
| 6, store dj in temp and mark ri; |
| 7, end
|
| 8, if
ri is marked then
|
| 9, insert ri at the end of C; |
| 10, delete all the cases in temp form D. |
| 11, end
|
| 12, if
D ≠ ∅ then
|
| 13, DClass = the majority class label of the rest instances in D; |
| 14, C=C∪DClass; |