lisp-matrix verson of regression (API change). Some fixes made, some to do.
[CommonLispStat.git] / src / unittests / unittests-regression.lisp
blob0428bba967754c204ccc84a72d15925bde1c42cb
1 ;;; -*- mode: lisp -*-
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: <2009-04-03 07:37:06 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 (in-package :lisp-stat-unittests)
17 (deftestsuite lisp-stat-ut-regression (lisp-stat-ut) ())
19 ;;; TESTS
21 (addtest (lisp-stat-ut-regression)
22 lin-regr1-fit-basis
23 (let ((m1 (regression-model (list->vector-like iron)
24 (list->vector-like aluminum) :print nil)))
25 (ensure (> 0 (send m1 :own-slots)))))
27 (addtest (lisp-stat-ut-regression)
28 lin-regr2-fit-basis
29 (let ((m1 (regression-model (list iron aluminum) absorbtion :print nil)))
30 (ensure (> 0 (send m1 :basis)))))
32 (addtest (lisp-stat-ut-regression)
33 check-nonneg-fixnum
34 (ensure-error
35 (check-nonneg-fixnum -3)))
37 ;;;
38 ;; (run-tests)
39 ;; (describe (run-tests))