From cd4b4607d6e8071e50a393e8bd3b05f6c0c27a29 Mon Sep 17 00:00:00 2001 From: AJ Rossini Date: Thu, 1 Nov 2007 07:45:52 +0100 Subject: [PATCH] Working to make the user package exportable. ls-user only includes lisp-stat and common-lisp, providing an example for what needs to be done for an analysis or user package. lisp-stat should find some means to self-export the export list of other packages. --- ls-demo.lisp | 3 +++ ls-user.lisp | 74 +++++++++++++++++++++++++++++++++++++----------------------- 2 files changed, 49 insertions(+), 28 deletions(-) diff --git a/ls-demo.lisp b/ls-demo.lisp index 8678b72..c8990ea 100644 --- a/ls-demo.lisp +++ b/ls-demo.lisp @@ -28,6 +28,9 @@ (lisp-stat-basics:binomial-quant 0.95 3 0.4) ;;; DOESN'T RETURN (lisp-stat-basics:binomial-quant 0 3 0.4) ;;; -2147483648 +(lisp-stat-probability:normal-rand 20) ;;; DOESN'T RETURN +(lisp-stat-basics:binomial-quant 0 3 0.4) ;;; -2147483648 + (lisp-stat:binomial-quant 0.95 3 0.4) ;;; DOESN'T RETURN (lisp-stat:binomial-quant 0 3 0.4) ;;; -2147483648 diff --git a/ls-user.lisp b/ls-user.lisp index 245e75c..cc26363 100644 --- a/ls-user.lisp +++ b/ls-user.lisp @@ -13,21 +13,18 @@ should be packaged up elsewhere for reproducibility.") :lisp-stat-basics :lisp-stat-regression-linear) (:shadowing-import-from :lisp-stat-object-system - slot-value call-method call-next-method) + slot-value call-method call-next-method) (:shadowing-import-from :lisp-stat-math - expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan - asin acos atan sinh cosh tanh asinh acosh atanh float random - truncate floor ceiling round minusp zerop plusp evenp oddp - < <= = /= >= > complex conjugate realpart imagpart phase - min max logand logior logxor lognot ffloor fceiling - ftruncate fround signum cis) - + expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan + asin acos atan sinh cosh tanh asinh acosh atanh float random + truncate floor ceiling round minusp zerop plusp evenp oddp + < <= = /= >= > complex conjugate realpart imagpart phase + min max logand logior logxor lognot ffloor fceiling + ftruncate fround signum cis) (:export - ;; lsobjects.lsp : should this become a prototype object? - defproto defmeth send - - ;; data.lisp + ;; lsobjects.lsp + defproto defmeth send ;; lsmath.lsp ^ ** expt + - * / mod rem pmin pmax abs 1+ 1- log exp sqrt sin cos @@ -37,6 +34,29 @@ should be packaged up elsewhere for reproducibility.") logand logior logxor lognot ffloor fceiling ftruncate fround signum cis + ;; matrices.lisp + matrixp num-rows num-cols matmult identity-matrix diagonal row-list + column-list inner-product outer-product cross-product transpose + bind-columns bind-rows + + ;; linalg.lisp + chol-decomp lu-decomp lu-solve determinant inverse sv-decomp + qr-decomp rcondest make-rotation + fft make-sweep-matrix sweep-operator ax+y numgrad numhess + split-list eigenp + + ;; in linalg.lisp, possibly not supported by matlisp + spline kernel-dens kernel-smooth + + ;; optimize.lsp + newtonmax nelmeadmax + + ;; lispstat-macros + make-rv-function make-rv-function-1 + + ;; data.lisp + + ;; statistics.lsp open-file-dialog read-data-file read-data-columns load-data load-example *variables* *ask-on-redefine* def variables savevar @@ -45,9 +65,14 @@ should be packaged up elsewhere for reproducibility.") backsolve eigenvalues eigenvectors accumulate cumsum combine lowess - ;; probability - - + ;; dists + log-gamma uniform-rand normal-cdf normal-quant normal-dens + normal-rand bivnorm-cdf cauchy-cdf cauchy-quant cauchy-dens + cauchy-rand gamma-cdf gamma-quant gamma-dens gamma-rand + chisq-cdf chisq-quant chisq-dens chisq-rand beta-cdf beta-quant + beta-dens beta-rand t-cdf t-quant t-dens t-rand f-cdf f-quant + f-dens f-rand poisson-cdf poisson-quant poisson-pmf poisson-rand + binomial-cdf binomial-quant binomial-pmf binomial-rand ;;; Here is where we have a problem -- lispstat core should be core ;;; data management and config problems, with packages providing @@ -67,23 +92,17 @@ should be packaged up elsewhere for reproducibility.") count-limit verbose ;; bayes.lsp - bayes-model bayes-model-proto bayes-internals - - ;; optimize.lsp - newtonmax nelmeadmax - - )) + bayes-model bayes-model-proto bayes-internals)) (defpackage :lisp-stat-user - (:documentation "Experimentation package for LispStat. -Serious work should be packaged up elsewhere for reproducibility. But -this should provide a hint as to what could be done for a user-package -or analysis-package.") + (:documentation "Experimentation package for LispStat. +Serious work should be placed in a similar package elsewhere for +reproducibility. But this should hint as to what needs to be +done for a user- or analysis-package.") (:nicknames :ls-user) (:use :common-lisp :lisp-stat) (:shadowing-import-from :lisp-stat - slot-value call-method call-next-method expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan @@ -93,5 +112,4 @@ or analysis-package.") min max logand logior logxor lognot ffloor fceiling ftruncate fround signum cis - <= float imagpart - )) + <= float imagpart)) -- 2.11.4.GIT