fixed up variables to match the load. Example dependency graph crafted, but need...
[CommonLispStat.git] / src / onto / onto.lisp
blobd9d374327beb67373ea87178bc4795ed98dcb106
3 #+nil
4 (progn ;; philosophy time
6 (setf my-model (model :name "ex1"
7 :data-slots (list w x y z)
8 :param-slots (list alpha beta gamma)
9 :math-form (regression-model :formula '(= w (+ (* beta x)
10 (* alpha y)
11 (* gamma z)
12 normal-error))
13 :centrality 'median ; 'mean
14 )))
16 #| or:
17 #R"W ~ x+ y + z "
20 (setf my-dataset (statistical-table :table data-frame-contents
21 :metadata (list (:case-names (list ))
22 (:var-names (list ))
23 (:documentation "string of doc"))))
25 (setf my-analysis (analysis
26 :model my-model
27 :data my-dataset
28 :parameter-map (pairing (model-param-slots my-model)
29 (data-var-names my-dataset))))
31 ;; ontological implications -- the analysis is an abstract class of
32 ;; data, model, and mapping between the model and data. The fit is
33 ;; the instantiation of such. This provides a statistical object
34 ;; computation theory which can be realized as "executable
35 ;; statistics" or "computable statistics".
36 (setf my-analysis (analyze my-fit
37 :estimation-method 'linear-least-squares-regression))
39 ;; one of the tricks here is that one needs to provide the structure
40 ;; from which to consider estimation, and more importantly, the
41 ;; validity of the estimation.
44 (setf linear-least-squares-regression
45 (estimation-method-definition
46 :variable-defintions ((list
47 ;; from MachLearn: supervised,
48 ;; unsupervised
49 :data-response-vars list-drv ; nil if unsup
50 ;;
51 :param-vars list-pv
52 :data-predictor-vars list-dpv
53 ;; nil in this case. these
54 ;; describe "out-of-box" specs
55 :hyper-vars list-hv))
56 :form '(regression-additive-error
57 :central-form (linear-form drv pv dpv)
58 :error-form 'normal-error)
59 :resulting-decision '(point-estimation interval-estimation)
60 :philosophy 'frequentist
61 :documentation "use least squares to fit a linear regression
62 model to data."))
64 (defparameter *statistical-philosophies*
65 '(frequentist bayesian fiducial decision-analysis)
66 "can be combined to build decision-making approaches and
67 characterizations")
69 (defparameter *decisions*
70 '(estimation selection testing)
71 "possible results from a...")
72 ;; is this really true? One can embedded hypothesis testing within
73 ;; estimation, as the hypothesis estimated to select. And
74 ;; categorical/continuous rear their ugly heads, but not really in
75 ;; an essential way.
77 (defparameter *ontology-of-decision-procedures*
78 (list :decisions
79 (list :estimation
80 (list :point
81 (list :maximum-likelihood
82 :minimum-entropy
83 :least-squares
84 :method-of-moments)
85 :interval
86 (list :maximum-likelihood
87 :))
88 :testing
89 (list :fisherian
90 :neyman-pearson
91 (list :traditional
92 :bioequivalence-inversion)
93 :selection
94 (list :ranking
95 :top-k-of-n-select))
96 :parametric
97 :partially-parametric))
98 "start of ontology"))