(defun zeror (n tbl &key (verbose t)) (labels ((trainer (tbl cautions egs) (table-majority-class tbl egs)) (tester (tbl cautions majority one) (cons majority (isa one tbl)))) (n-way n tbl :verbose verbose :trainer #'trainer :tester #'tester))) (deftest test-zeror () (let ((tmp (zeror 3 (weather) :verbose nil))) (check (samep tmp "( #(ABCD :FOR 2 :A 0 :B 10 :C 0 :D 18 :ACC .64 :PD .64 :PF .00 :PREC 1.00 :F .00 :BAL .75) #(ABCD :FOR 1 :A 18 :B 0 :C 10 :D 0 :ACC .64 :PD .00 :PF .36 :PREC .00 :F .00 :BAL .25))"))))