3 ;;; File: unittests-regression.lisp
4 ;;; Author: AJ Rossini <blindglobe@gmail.com>
5 ;;; Copyright: (c)2008, AJ Rossini.
6 ;;; License: BSD, see LICENSE.BSD file for details.
7 ;;; Purpose: unit-tests for regression; also make good examples
8 ;;; Time-stamp: <2008-05-13 17:16:07 tony>
9 ;;; Creation: <2008-05-13 17:16:07 tony>
11 ;;; What is this talk of 'release'? Klingons do not make software
12 ;;; 'releases'. Our software 'escapes', leaving a bloody trail of
13 ;;; designers and quality assurance people in its wake.
15 ;;; This organization and structure is new to the 21st Century
20 ;; if needed, but need to set the ASDf path first...!
21 ;; (asdf:oos 'asdf:load-op :lift)
23 (defpackage :lisp-stat-regression-unittests
25 :lift
:lisp-stat-unittests
28 (in-package :lisp-stat-regression-unittests
)
30 (defun run-lisp-stat-tests ()
31 (run-tests :suite
'lisp-stat
))
33 (defun run-lisp-stat-test (&rest x
)
36 (deftestsuite lisp-stat-regression
(lisp-stat) ())
39 ;;; setup data tht we need to get this work done.
41 (defvar regr-testdata nil
42 "dataset used for testing")
44 (defvar regr-testdata-iron nil
"testvector one")
45 (defvar regr-testdata-alu nil
"testvector one")
46 (defvar regr-testdata-othe nil
"testvector one")
47 (defvar m1 nil
"fitted regr model 1")
48 (defvar m1 nil
"fitted regr model 2")
51 ;;; now go to the tests so that we can do the right thing with the
54 (addtest (lisp-stat-regression) simp-lin-regr1-fit
57 (setf m1
(regression-model regr-testdat-iron regr-testdat-alu
))
61 (addtest (lisp-stat-regression) lin-regr1-bomb
63 (check-nonneg-fixnum -
3)))
67 ;; (describe (run-tests))