From 2c03b51e34549ed9902eb2dbe13b46c34a8ebac4 Mon Sep 17 00:00:00 2001 From: AJ Rossini Date: Mon, 16 Mar 2009 14:50:40 +0100 Subject: [PATCH] we don't have a problem with correlation -- unless there is some weighting of stuff, then we can safely ignore this approach. Signed-off-by: AJ Rossini --- src/algorithms/bootstrap.lisp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/algorithms/bootstrap.lisp b/src/algorithms/bootstrap.lisp index f6e21be..8282299 100644 --- a/src/algorithms/bootstrap.lisp +++ b/src/algorithms/bootstrap.lisp @@ -1,6 +1,6 @@ ;;; -*- mode: lisp -*- -;;; Time-stamp: <2009-02-06 16:06:02 tony> +;;; Time-stamp: <2009-03-12 17:46:34 tony> ;;; Creation: <2008-03-11 19:18:34 user> ;;; File: bootstrap.lisp ;;; Author: AJ Rossini @@ -19,22 +19,29 @@ ;;; (bootstrap data #'function args) ;;; -(defmacro with-data-bootstrap ((list-of-sources-and-var n) @body) +(defmacro with-data-bootstrap (n (list-of-sources-and-vars) @body) "A proposed lispy implementation, such as: - (with-data-bootstrap ((a dataset1) + (with-data-bootstrap n + ((a dataset1) (b dataset2)) (some-form-with-inputs a b c)) where there could be multiple datasets, with a and b, etc, being bootstrap realizations of dataset1 and dataset2." (Destructure list-of-sources-and-var) (loop repeat n - (progn (pull-samples sources) - @body) + (progn (pull-samples sources) + @body) accumulate in result-list)) -(defmacro with-correlated-data-bootstrap ()) +;; (defmacro with-correlated-data-bootstrap ()) -;;; functional +;; The point of this goes away when we have assurance that +;; observations are independent. And by being able to embed complex +;; objects (temporal / spatial / network structures) into the dataset +;; as typed variables, we now are able to assure such a probability +;; structure. + +;;; functional approach (defgeneric bootstrap-sample (data &optional n replace) (:documentation "generate a dataset of N obs from DATA either with -- 2.11.4.GIT