(setf *default-pathname-defaults* (make-pathname :directory (format nil "~A" (nth 1 *posix-argv*)))) (defparameter *TEST* (nth 3 *posix-argv*)) (defparameter *TRAIN* (nth 2 *posix-argv*)) (defparameter *USELWL* (parse-integer (nth 4 *posix-argv*))) (defparameter *MINCASES* (parse-integer (nth 5 *posix-argv*))) (defparameter *TREESIZE* 0) ;(defparameter *TEST* "/tmp/bryanl/tmp.thUOHI5715/test.arff") ;(defparameter *TRAIN* "/tmp/bryanl/tmp.thUOHI5715/train.arff") ;(defparameter *USELWL* 1) ; disable an irritating SBCL flag (defparameter *TESTSET* nil) (defparameter *TRAINSET* nil) (defparameter *LIMIT* 4) (defvar *stop-for-gc-pending* t) ;(setf SB-EXT:*BYTES-CONSED-BETWEEN-GCS* 10000) #+SBCL (DECLAIM (SB-EXT:MUFFLE-CONDITIONS CL:STYLE-WARNING)) (defun make (&optional (system "wisprdr")) (make1 system)) (defun make! (&optional (system "wisprdr")) (make1 system t)) (defun make1 (sys &optional forcep) (asdf:operate 'asdf:load-source-op sys :force forcep :verbose nil)) ;(make "wisp-rdr.asd") (defun compile-files (&rest files) (with-compilation-unit () (mapcar #'(lambda (file) (compile-file file)) files))) ;(compile-files "tests/quicksort") (make) (let ((ruleGen (cond ((= *USELWL* 1) #'GenRuleNew4) ((= *USELWL* 4) #'GenRuleNew) ((= *USELWL* 5) #'GenRuleNew2) ((= *USELWL* 6) #'GenRuleNew3) (t #'GenRuleBase)))) (cond ((= *USELWL* 1) (setf *LIMIT* 4)) ((= *USELWL* 4) (setf *LIMIT* 5)) ((= *USELWL* 5) (setf *LIMIT* 3)) ((= *USELWL* 6) (setf *LIMIT* 2))) (if (= *USELWL* 3) (setf *TRAINSET* (increaseTrue (arffToIccle *TRAIN*))) (if (= *USELWL* 2) (setf *TRAINSET* (decreaseFalse (arffToIccle *TRAIN*))) (setf *TRAINSET* (arffToIccle *TRAIN*)))) (setf *TESTSET* (arffToIccle *TEST*)) (RDR *TESTSET* *TRAINSET* :ruleGenerator ruleGen)) ; (RDR (titanic) (titanic) :ruleGenerator ruleGen)) (quit)