From aa38fb96e78dc640a8c38293297965313339ba8d Mon Sep 17 00:00:00 2001 From: Steef Date: Fri, 23 Sep 2016 14:09:16 +0200 Subject: [PATCH] Minor update of script below to test multiple categories --- skbold/utils/crossval_splitter.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/skbold/utils/crossval_splitter.py b/skbold/utils/crossval_splitter.py index 2f89fe6..287d8d1 100644 --- a/skbold/utils/crossval_splitter.py +++ b/skbold/utils/crossval_splitter.py @@ -159,8 +159,12 @@ def plot_results(self): train_size = len(subs)/2 test_size = len(subs)-train_size - crosval = CrossvalSplitter(file_path = tsv_path, iterations=1000, train_size=train_size, test_size=test_size, include=subs, categorical={'Sekse': [1, 2]}, continuous=['Lftd', 'pashlerH'], ignore=9999) - (train_idx, test_idx) = crosval.split(verbose=False) + crosval = CrossvalSplitter(file_path = tsv_path, iterations=1000, train_size=train_size, test_size=test_size, include=subs, + categorical={'Sekse': [1, 2], + 'Opl_tot': [1, 2], + 'Opl_rcht_tot': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]}, + continuous=['Lftd', 'pashlerH', 'ZRaven_tot'], ignore=9999) + (train_idx, test_idx) = crosval.split(verbose=True) crosval.save(output_path) crosval.plot_results() \ No newline at end of file