Research Article

Boosting Accuracy of Classical Machine Learning Antispam Classifiers in Real Scenarios by Applying Rough Set Theory

Algorithm 1

Pseudocode of the proposed algorithm for the generation of RS revision rules.
(00) FUNCTION computeRules E: MessageIdentifierVector,
(01)           A: ConditionAttributeMatrix, X: DecisionAttributeMatrix);
(02)  X2: DecisionAttributeMatrix;
(03)  RED: AttributeSet;
(04)  R: Rule;
(05)  RESULT: Ruleset;
(06)
(07)  FOREACH  eINCLUDED IN E DO
(08)   FOREACH eINCLUDED IN E DO
(09)     IF (e == e ) THEN X2e = 1;
(10)     ELSE IF ( X == X ) THEN X2 = ?;
(11)     ELSE X2 = 0;
(12)   END_FOREACH;
(13)   RED = computeShortestReduct (E, A, X2);
(14)
(15)   FOREACH aINCLUDED IN R DO
(16)    IF (aINCLUDED IN RED) THEN
(17)      R.conditions = A, a;
(18)    ELSE R.conditions = ?;
(19)   END_FOREACH;
(20)   R.decision=X;
(21)   RESULT.add(R);
(22)  END_FOREACH;
(23)  RETURN RESULT;
(24) END_FUNCTION;