From 67c8d87779abb025fd9a822c93797a34156d4e4e Mon Sep 17 00:00:00 2001 From: AJ Rossini Date: Wed, 29 Apr 2009 08:40:40 +0200 Subject: [PATCH] migration of onto knowledge component. Signed-off-by: AJ Rossini --- TODO.lisp | 119 ++++++----------------------------------------------- src/onto/onto.lisp | 98 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+), 107 deletions(-) create mode 100644 src/onto/onto.lisp diff --git a/TODO.lisp b/TODO.lisp index feec3a1..92732d3 100644 --- a/TODO.lisp +++ b/TODO.lisp @@ -1,6 +1,6 @@ ;;; -*- mode: lisp -*- -;;; Time-stamp: <2009-04-28 13:10:21 tony> +;;; Time-stamp: <2009-04-29 08:35:29 tony> ;;; Creation: <2008-09-08 08:06:30 tony> ;;; File: TODO.lisp ;;; Author: AJ Rossini @@ -43,18 +43,21 @@ (in-package :ls-user) +#+nil (progn ;; Plotting -- need to figure out the core-dump, or change libraries. ;; (asdf:oos 'asdf:load-op 'cl-plplot) - (plot-ex) - (defparameter *gdev* "xcairo") ;; (defparameter *gdev* "xwin") - (cl-plplot::plsdev *gdev*) + (defparameter *gdev* "xcairo") + ;; (cl-plplot::plsdev *gdev*) ; -- usually handled within call. + (plot-ex) + (plot-ex) + ;; Boom! -- there is currently a loose pointer floating around that + ;; causes errors the 3rd time that we create a plot (and crashes + ;; SBCL the 4th time). Order independent. + (plot-ex) - ;; there is currently a loose pointer floating around that causes - ;; errors the 3rd time that we create a plot (and crashes SBCL the - ;; 4th time). Order independent. (contour-plot-ex) (fn-contour-plot-ex) (shade-plot-ex) @@ -94,7 +97,7 @@ #+nil (progn ;; experiments with GSL and the Lisp interface. (asdf:oos 'asdf:load-op 'gsll) - (asdf:oos 'asdf:load-op 'gsll-tests) + (asdf:oos 'asdf:load-op 'gsll-tests) ; requires lisp-unit ;; the following should be equivalent (defparameter *t1* (LIST 6.18d0 6.647777777777779d0 6.18d0)) @@ -110,6 +113,7 @@ (gsll:WEIGHTED-ABSOLUTE-DEVIATION VEC WEIGHTS) (gsll:ABSOLUTE-DEVIATION VEC MEAN)))))) (eql *t1* *t2*) + (equal *t1* *t2*) ;; from (gsll:examples 'gsll::numerical-integration) ... (gsll:integration-qng gsll::one-sine 0.0d0 PI) @@ -144,102 +148,3 @@ (gsll:gsl-lookup "gsl_linalg_LU_solve") ; => gsll:lu-solve ) - - -#+nil -(progn ;; philosophy time - - (setf my-model (model :name "ex1" - :data-slots (list w x y z) - :param-slots (list alpha beta gamma) - :math-form (regression-model :formula '(= w (+ (* beta x) - (* alpha y) - (* gamma z) - normal-error)) - :centrality 'median ; 'mean - ))) - -#| or: - #R"W ~ x+ y + z " -|# - - (setf my-dataset (statistical-table :table data-frame-contents - :metadata (list (:case-names (list )) - (:var-names (list )) - (:documentation "string of doc")))) - - (setf my-analysis (analysis - :model my-model - :data my-dataset - :parameter-map (pairing (model-param-slots my-model) - (data-var-names my-dataset)))) - - ;; ontological implications -- the analysis is an abstract class of - ;; data, model, and mapping between the model and data. The fit is - ;; the instantiation of such. This provides a statistical object - ;; computation theory which can be realized as "executable - ;; statistics" or "computable statistics". - (setf my-analysis (analyze my-fit - :estimation-method 'linear-least-squares-regression)) - - ;; one of the tricks here is that one needs to provide the structure - ;; from which to consider estimation, and more importantly, the - ;; validity of the estimation. - - ;; - (setf linear-least-squares-regression - (estimation-method-definition - :variable-defintions ((list - ;; from MachLearn: supervised, - ;; unsupervised - :data-response-vars list-drv ; nil if unsup - ;; - :param-vars list-pv - :data-predictor-vars list-dpv - ;; nil in this case. these - ;; describe "out-of-box" specs - :hyper-vars list-hv)) - :form '(regression-additive-error - :central-form (linear-form drv pv dpv) - :error-form 'normal-error) - :resulting-decision '(point-estimation interval-estimation) - :philosophy 'frequentist - :documentation "use least squares to fit a linear regression - model to data.")) - - (defparameter *statistical-philosophies* - '(frequentist bayesian fiducial decision-analysis) - "can be combined to build decision-making approaches and - characterizations") - - (defparameter *decisions* - '(estimation selection testing) - "possible results from a...") - ;; is this really true? One can embedded hypothesis testing within - ;; estimation, as the hypothesis estimated to select. And - ;; categorical/continuous rear their ugly heads, but not really in - ;; an essential way. - - (defparameter *ontology-of-decision-procedures* - (list :decisions - (list :estimation - (list :point - (list :maximum-likelihood - :minimum-entropy - :least-squares - :method-of-moments) - :interval - (list :maximum-likelihood - :)) - :testing - (list :fisherian - :neyman-pearson - (list :traditional - :bioequivalence-inversion) - :selection - (list :ranking - :top-k-of-n-select)) - :parametric - :partially-parametric)) - "start of ontology")) - diff --git a/src/onto/onto.lisp b/src/onto/onto.lisp new file mode 100644 index 0000000..d9d3743 --- /dev/null +++ b/src/onto/onto.lisp @@ -0,0 +1,98 @@ + + +#+nil +(progn ;; philosophy time + + (setf my-model (model :name "ex1" + :data-slots (list w x y z) + :param-slots (list alpha beta gamma) + :math-form (regression-model :formula '(= w (+ (* beta x) + (* alpha y) + (* gamma z) + normal-error)) + :centrality 'median ; 'mean + ))) + +#| or: + #R"W ~ x+ y + z " +|# + + (setf my-dataset (statistical-table :table data-frame-contents + :metadata (list (:case-names (list )) + (:var-names (list )) + (:documentation "string of doc")))) + + (setf my-analysis (analysis + :model my-model + :data my-dataset + :parameter-map (pairing (model-param-slots my-model) + (data-var-names my-dataset)))) + + ;; ontological implications -- the analysis is an abstract class of + ;; data, model, and mapping between the model and data. The fit is + ;; the instantiation of such. This provides a statistical object + ;; computation theory which can be realized as "executable + ;; statistics" or "computable statistics". + (setf my-analysis (analyze my-fit + :estimation-method 'linear-least-squares-regression)) + + ;; one of the tricks here is that one needs to provide the structure + ;; from which to consider estimation, and more importantly, the + ;; validity of the estimation. + + ;; + (setf linear-least-squares-regression + (estimation-method-definition + :variable-defintions ((list + ;; from MachLearn: supervised, + ;; unsupervised + :data-response-vars list-drv ; nil if unsup + ;; + :param-vars list-pv + :data-predictor-vars list-dpv + ;; nil in this case. these + ;; describe "out-of-box" specs + :hyper-vars list-hv)) + :form '(regression-additive-error + :central-form (linear-form drv pv dpv) + :error-form 'normal-error) + :resulting-decision '(point-estimation interval-estimation) + :philosophy 'frequentist + :documentation "use least squares to fit a linear regression + model to data.")) + + (defparameter *statistical-philosophies* + '(frequentist bayesian fiducial decision-analysis) + "can be combined to build decision-making approaches and + characterizations") + + (defparameter *decisions* + '(estimation selection testing) + "possible results from a...") + ;; is this really true? One can embedded hypothesis testing within + ;; estimation, as the hypothesis estimated to select. And + ;; categorical/continuous rear their ugly heads, but not really in + ;; an essential way. + + (defparameter *ontology-of-decision-procedures* + (list :decisions + (list :estimation + (list :point + (list :maximum-likelihood + :minimum-entropy + :least-squares + :method-of-moments) + :interval + (list :maximum-likelihood + :)) + :testing + (list :fisherian + :neyman-pearson + (list :traditional + :bioequivalence-inversion) + :selection + (list :ranking + :top-k-of-n-select)) + :parametric + :partially-parametric)) + "start of ontology")) -- 2.11.4.GIT