| Algorithm 2: Disease Prediction Algorithm (DPA) | ||
| Input | : | Testing data, Classification Rules (ClassiRule1, ClassiRule2 and ClassiRule3) |
| Output | : | Predicted Patient Disease (PRED) |
| Step 1 | : | //If this attribute is a target attribute, then return the target attribute value |
| Step 2 | : | IF(ClassiRule1.attribute = TA) |
| Step 3 | : | PRED1 = ClassiRule1.classValue |
| Step 4 | : | ELSE |
| Step 5 | : | //otherwise, check which rule should follow |
| Step 6 | : | //by comparing the attribute of the instance |
| Step 7 | : | //with the one in the rule |
| Step 8 | : | VAL = INS[ClassiRule1.attribute] |
| Step 9 | : | i = 0 |
| Step 10 | : | For each ClassiRule1.attributeValues [i] from ClassiRule1.attributeValues |
| Step 11 | : | IF (ClassiRule1.attributeValues [i] == VAL) |
| Step 12 | : | predictTargetAttributeValue(ClassiRule1.attributes [i], INS) |
| Step 13 | : | End IF |
| Step 14 | : | End For |
| Step 15 | : | End IF |
| Step 16 | : | PRED2 = Predict Testing data using MLP classifier with ClassiRule2 |
| Step 17 | : | PRED3 = Predict Testing data using Dl4jMlpClassifier with ClassiRule3 |
| Step 18 | : | PRED = ““ |
| Step 19 | : | IF (PRED1 = PRED2) |
| Step 20 | : | PRED = PRED1 |
| Step 21 | : | ELSE IF (PRED1 = PRED3) |
| Step 22 | : | PRED = PRED1 |
| Step 23 | : | ELSE IF (PRED2 = PRED3) |
| Step 24 | : | PRED = PRED2 |
| Step 25 | : | End IF |
| Step 26 | : | return PRED |