Toggle navigation
?
users online
Logout
Open hangout
Open chat for current file
% Decision tree rules classify(Time, Age, Number_of_Warts, Type, Class) :- ( Time =< 8.12, ( Age =< 45.50; Age > 45.50, ! ), ! ; Time > 8.12, ( Age =< 16.50; Age > 16.50, ( Age =< 25.50, ( Age =< 23.50, ( Time =< 9.00, ! ; Time > 9.00, ! ) ; Age > 23.50, ! ) ; Age > 25.50, ( Number_of_Warts =< 8.50, ! ; Number_of_Warts > 8.50, ( Type =< 1.50, ! ; Type > 1.50, ! ) ) ) ) ), (Class = 1 -> writeln('Treatment will be successful'); writeln('Treatment will not be successful')). % Predicate to take inputs from the user take_inputs :- write("Welcome to the treatment prediction program...'), write('Enter Age: '), read(Age), write('Enter Time: '), read(Time), write('Enter Number of Warts: '), read(Number_of_Warts), write('Enter Type: '), read(Type), classify(Time, Age, Number_of_Warts, Type, _). % Entry point start(take_inputs) :- .