Projects/laydi
Projects
/
laydi
Archived
7
0
Fork 0

first import lpls

This commit is contained in:
Arnar Flatberg 2007-07-23 17:35:28 +00:00
parent 54d271b841
commit 939dba20ee
1 changed files with 16 additions and 0 deletions

View File

@ -21,6 +21,7 @@ class SmallTestWorkflow(workflow.Workflow):
load.add_function(DatasetLoadFunctionSmokerSmall())
load.add_function(DatasetLoadFunctionSmokerMedium())
load.add_function(DatasetLoadFunctionSmokerFull())
load.add_function(DatasetLoadFunctionSmokerGO())
#load.add_function(DatasetLoadFunctionCYCLE())
self.add_stage(load)
@ -40,6 +41,7 @@ class SmallTestWorkflow(workflow.Workflow):
model = workflow.Stage('models', 'Models')
model.add_function(blmfuncs.PCA())
model.add_function(blmfuncs.PLS())
model.add_function(blmfuncs.LPLS())
#model.add_function(bioconFuncs.SAM(app))
self.add_stage(model)
@ -113,6 +115,20 @@ class DatasetLoadFunctionSmokerFull(workflow.Function):
out.append(dataset.read_ftsv(input_file))
return out
class DatasetLoadFunctionSmokerGO(workflow.Function):
"""Loader for all ftsv files of smokers small datasets."""
def __init__(self):
workflow.Function.__init__(self, 'load_go', 'Smoker (GO)')
def run(self):
path = 'data/smokers-go/'
files = os.listdir(path)
out = []
for fname in files:
if fname.endswith('.ftsv'):
input_file = open(os.path.join(path, fname))
out.append(dataset.read_ftsv(input_file))
return out
class DatasetLoadFunctionCYCLE(workflow.Function):
"""Loader for pickled CYCLE datasets."""