% cd ~ashwin/ml % cl Allegro CL 3.0.3.sequent.1 [sequent] (9/21/89 14:29) Copyright (C) 1985-1988, Franz Inc., Berkeley, CA, USA (load "id3.lisp") ; Loading /hydra6/ashwin/ml/id3.lisp. T (load "weather-data.lisp") ; Loading /hydra6/ashwin/ml/weather-data.lisp. T (pprint weather-examples) ((- (SUNNY HOT HIGH FALSE)) (- (SUNNY HOT HIGH TRUE)) (+ (OVERCAST HOT HIGH FALSE)) (+ (RAIN MILD HIGH FALSE)) (+ (RAIN COOL NORMAL FALSE)) (- (RAIN COOL NORMAL TRUE)) (+ (OVERCAST COOL NORMAL TRUE)) (- (SUNNY MILD HIGH FALSE)) (+ (SUNNY COOL NORMAL FALSE)) (+ (RAIN MILD NORMAL FALSE)) (+ (SUNNY MILD NORMAL TRUE)) (+ (OVERCAST MILD HIGH TRUE)) (+ (OVERCAST HOT NORMAL FALSE)) (- (RAIN MILD HIGH TRUE))) (id3 weather-examples) Feature: OUTLOOK SUNNY Feature: HUMIDITY HIGH Class is: - NORMAL Class is: + OVERCAST Class is: + RAIN Feature: WINDY TRUE Class is: - FALSE Class is: + (setf *trace-id3* t) T (id3 weather-examples) Info gain for feature 1 = 0.247 Info gain for feature 2 = 0.029 Info gain for feature 3 = 0.152 Info gain for feature 4 = 0.048 Splitting on feature 1 Considering value SUNNY of feature 1 Info gain for feature 2 = 0.571 Info gain for feature 3 = 0.971 Info gain for feature 4 = 0.020 Splitting on feature 3 Considering value HIGH of feature 3 All examples - Considering value NORMAL of feature 3 All examples + Considering value OVERCAST of feature 1 All examples + Considering value RAIN of feature 1 Info gain for feature 2 = 0.020 Info gain for feature 3 = 0.020 Info gain for feature 4 = 0.971 Splitting on feature 4 Considering value TRUE of feature 4 All examples - Considering value FALSE of feature 4 All examples + Feature: OUTLOOK SUNNY Feature: HUMIDITY HIGH Class is: - NORMAL Class is: + OVERCAST Class is: + RAIN Feature: WINDY TRUE Class is: - FALSE Class is: + (exit) ; Exiting Lisp %