Question: A sample decision tree for classifying the given software module as having defects or no-defects is given. Derive if-then rules from this tree and code


A sample decision tree for classifying the given software module as having defects or no-defects is given. Derive if-then rules from this tree and code these rules as Prolog rules. The Prolog code must take the attribute values as input and classify whether the module has defects using the decision tree as reference. Attribute Information: % \% 1. loc numeric \% McCabe's line count of code \% 2. v(g) : numeric \% McCabe "cyclomatic complexity" % 3. ev(g) : numeric \% McCabe "essential complexity" \% 4. iv (g) : numeric \% McCabe "design complexity" %5.n numeric % Halstead total operators + operands %6.v numeric \% Halstead "volume" %7.1 numeric \% Halstead "program length" \% 8.d numeric \% Halstead "difficulty" \% 9. i inumeric \% Halstead "intelligence" %10. e numeric \% Halstead "effort" %11.b numeric \% Halstead %12.t numeric \% Halstead's time estimator \% 13. defects \{false,true\} \% module has/has not one or more %% reported defects 1. Derive the rules from the given decision tree and code as Prolog rules. 2. Interactive implementation. Dynamic inputs-based run of the logic expert system with step wise options display and error free recommendation \& ending
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
