comparison train_test_eval.py @ 15:c1ca24a1509d draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 5b2ac730ec6d3b762faa9034eddd19ad1b347476"
author bgruening
date Mon, 16 Dec 2019 05:41:39 -0500
parents 68753d45815f
children cb5635e30842
comparison
equal deleted inserted replaced
14:4af699d766e4 15:c1ca24a1509d
1 import argparse 1 import argparse
2 import joblib 2 import joblib
3 import json 3 import json
4 import numpy as np 4 import numpy as np
5 import os
5 import pandas as pd 6 import pandas as pd
6 import pickle 7 import pickle
7 import warnings 8 import warnings
8 from itertools import chain 9 from itertools import chain
9 from scipy.io import mmread 10 from scipy.io import mmread
27 28
28 _fit_and_score = try_get_attr('galaxy_ml.model_validations', '_fit_and_score') 29 _fit_and_score = try_get_attr('galaxy_ml.model_validations', '_fit_and_score')
29 setattr(_search, '_fit_and_score', _fit_and_score) 30 setattr(_search, '_fit_and_score', _fit_and_score)
30 setattr(_validation, '_fit_and_score', _fit_and_score) 31 setattr(_validation, '_fit_and_score', _fit_and_score)
31 32
32 N_JOBS = int(__import__('os').environ.get('GALAXY_SLOTS', 1)) 33 N_JOBS = int(os.environ.get('GALAXY_SLOTS', 1))
33 CACHE_DIR = './cached' 34 CACHE_DIR = os.path.join(os.getcwd(), 'cached')
35 del os
34 NON_SEARCHABLE = ('n_jobs', 'pre_dispatch', 'memory', '_path', 36 NON_SEARCHABLE = ('n_jobs', 'pre_dispatch', 'memory', '_path',
35 'nthread', 'callbacks') 37 'nthread', 'callbacks')
36 ALLOWED_CALLBACKS = ('EarlyStopping', 'TerminateOnNaN', 'ReduceLROnPlateau', 38 ALLOWED_CALLBACKS = ('EarlyStopping', 'TerminateOnNaN', 'ReduceLROnPlateau',
37 'CSVLogger', 'None') 39 'CSVLogger', 'None')
38 40