From 2f6ac4ab39a34f2d1c39d6197eec4b0d4fd09f9c Mon Sep 17 00:00:00 2001 From: AJ Rossini Date: Thu, 25 Mar 2010 08:04:38 +0100 Subject: [PATCH] fixed up variables to match the load. Example dependency graph crafted, but need to make this a chain or mixed graph, not a unimodal directed/undirected graph. summarize API stated as a strawman, need to consider it more. Signed-off-by: AJ Rossini --- examples/01-basicEDA.lisp | 17 ++++++++++++----- src/describe/summarize.lisp | 10 +++++++--- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/examples/01-basicEDA.lisp b/examples/01-basicEDA.lisp index 9ed3e7c..bdebf0f 100644 --- a/examples/01-basicEDA.lisp +++ b/examples/01-basicEDA.lisp @@ -1,11 +1,11 @@ ;;; -*- mode: lisp -*- -;;; Time-stamp: <2010-02-10 14:23:42 tony> +;;; Time-stamp: <2010-03-03 16:22:26 tony> ;;; Creation: <2009-04-19 09:41:09 tony> ;;; File: basic-eda.lisp ;;; Author: AJ Rossini -;;; Copyright: (c)2009--, AJ Rossini. BSD, MIT, LLGPL, or -;;; GPLv2+, or GPLv3+ depending on how it arrives. +;;; Copyright: (c)2009--, AJ Rossini. See LICENSE.mit in top level +;;; directory for conditions. ;;; Purpose: Example of basic exploratory data analysis in CLS. ;;; What is this talk of 'release'? Klingons do not make software @@ -20,7 +20,7 @@ (load (localized-pathto "loading-data.lisp") :verbose t) -*chickwts* +*chickwts-df* ;; Summarize is the basic EDA tool -- it accepts symbols or lists of ;; symbols, to describe what, when, and how to do it. The resulting @@ -40,8 +40,15 @@ ;; #3 sampling/temporal component of variables ;; +(defparameter *chkwt-df-depgraph* + (let ((g (make-container 'graph-container ))) + (loop for v in (var-list *chickwt-df*) + (add-vertex g v)) + (loop for (v1 . v2) in (appropriate-pairs-list *chickwt-df*) + (add-edge-between-vertexes g v1 v2)))) + (defparameter *my-df-smry-num* - (summarize *chickwts* :type 'numerical :io 'listing) + (summarize *chickwts-df* :type 'numerical :io 'listing) "First numerical summary of *my-df-smry*") (defparameter *my-df-smry-num* diff --git a/src/describe/summarize.lisp b/src/describe/summarize.lisp index e0018d6..2a7a10b 100644 --- a/src/describe/summarize.lisp +++ b/src/describe/summarize.lisp @@ -1,6 +1,6 @@ ;;; -*- mode: lisp -*- -;;; Time-stamp: <2010-02-10 21:58:13 tony> +;;; Time-stamp: <2010-02-11 13:08:00 tony> ;;; Creation: <2009-03-12 17:14:56 tony> ;;; File: summarize.lisp ;;; Author: AJ Rossini @@ -13,6 +13,10 @@ (in-package :cls-core-methods) -(defgeneric summarize (ds &allow-other-keys) - (:documentation "general approach to providing summarizes. Tie in different approachs to hat we want to do.")) +(defgeneric summarize (ds &key output style &allow-other-keys) + (:documentation "general approach to providing summarizes. Tie in different approachs to hat we want to do.") + (:method ((ds dataframe-like) + &key (output 'visual) (style 'fixed) (metadf nil)) + + )) -- 2.11.4.GIT