From a1ab79024e5476f44ad0dd47d19c403177394426 Mon Sep 17 00:00:00 2001 From: einarr Date: Sun, 6 Mar 2011 15:27:16 +0000 Subject: [PATCH] Adding simple workflow named "default" with PCA, PLS and LPLS. Changed the program to use this as the default workflow. --- bin/laydi | 2 +- workflows/default.py | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 workflows/default.py diff --git a/bin/laydi b/bin/laydi index 64dbc1a..a026318 100755 --- a/bin/laydi +++ b/bin/laydi @@ -66,7 +66,7 @@ def parse_options(): help='List available workflows.') op.add_option('-w', '--workflow', - default='chemometric', + default='default', help='Start with selected workflow') op.add_option('-c', '--generate-config', diff --git a/workflows/default.py b/workflows/default.py new file mode 100644 index 0000000..c5c5eda --- /dev/null +++ b/workflows/default.py @@ -0,0 +1,24 @@ +import sys,os +import os.path +import cPickle + +from laydi import logger, plots, workflow, dataset, main, annotations +from laydi.lib import blmfuncs, nx_utils, validation, engines, cx_stats, cx_utils + +class DefaultWorkflow(workflow.Workflow): + name = 'Default' + ident = 'default' + description = 'General bilinear modelling workflow' + + def __init__(self): + workflow.Workflow.__init__(self) + + # BLM's + model = workflow.Stage('models', 'Models') + model.add_function(blmfuncs.PCA()) + model.add_function(blmfuncs.PLS()) + model.add_function(blmfuncs.LPLS()) + self.add_stage(model) + + logger.log('debug', 'Default workflow loaded.') +