Skip to content
This repository has been archived by the owner on Mar 7, 2022. It is now read-only.

Commit

Permalink
Minor update of script below to test multiple categories
Browse files Browse the repository at this point in the history
  • Loading branch information
Steef committed Sep 23, 2016
1 parent 1dcb053 commit aa38fb9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions skbold/utils/crossval_splitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit aa38fb9

Please sign in to comment.