Previous changeset 9:4aa701f5a393 (2021-04-13) Next changeset 11:60c726f5cc5e (2021-05-01) |
Commit message:
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2" |
modified:
fitted_model_eval.py keras_deep_learning.py keras_train_and_eval.py ml_visualization_ex.py model_prediction.py search_model_validation.py simple_model_fit.py stacking_ensembles.py train_test_eval.py train_test_split.py |
b |
diff -r 4aa701f5a393 -r 22f9cbcf1582 fitted_model_eval.py --- a/fitted_model_eval.py Tue Apr 13 18:00:54 2021 +0000 +++ b/fitted_model_eval.py Tue Apr 13 21:54:09 2021 +0000 |
b |
@@ -1,13 +1,13 @@ import argparse import json -import pandas as pd import warnings +import pandas as pd +from galaxy_ml.utils import get_scoring, load_model, read_columns from scipy.io import mmread -from sklearn.pipeline import Pipeline from sklearn.metrics.scorer import _check_multimetric_scoring from sklearn.model_selection._validation import _score -from galaxy_ml.utils import get_scoring, load_model, read_columns +from sklearn.pipeline import Pipeline def _get_X_y(params, infile1, infile2): |
b |
diff -r 4aa701f5a393 -r 22f9cbcf1582 keras_deep_learning.py --- a/keras_deep_learning.py Tue Apr 13 18:00:54 2021 +0000 +++ b/keras_deep_learning.py Tue Apr 13 21:54:09 2021 +0000 |
b |
@@ -1,14 +1,14 @@ import argparse import json +import pickle +import warnings +from ast import literal_eval + import keras import pandas as pd -import pickle import six -import warnings - -from ast import literal_eval -from keras.models import Sequential, Model -from galaxy_ml.utils import try_get_attr, get_search_params, SafeEval +from galaxy_ml.utils import get_search_params, SafeEval, try_get_attr +from keras.models import Model, Sequential safe_eval = SafeEval() |
b |
diff -r 4aa701f5a393 -r 22f9cbcf1582 keras_train_and_eval.py --- a/keras_train_and_eval.py Tue Apr 13 18:00:54 2021 +0000 +++ b/keras_train_and_eval.py Tue Apr 13 21:54:09 2021 +0000 |
[ |
@@ -1,32 +1,32 @@ import argparse -import joblib import json -import numpy as np import os -import pandas as pd import pickle import warnings from itertools import chain -from scipy.io import mmread -from sklearn.pipeline import Pipeline -from sklearn.metrics.scorer import _check_multimetric_scoring -from sklearn.model_selection._validation import _score -from sklearn.model_selection import _search, _validation -from sklearn.utils import indexable, safe_indexing +import joblib +import numpy as np +import pandas as pd from galaxy_ml.externals.selene_sdk.utils import compute_score -from galaxy_ml.model_validations import train_test_split from galaxy_ml.keras_galaxy_models import _predict_generator +from galaxy_ml.model_validations import train_test_split from galaxy_ml.utils import ( - SafeEval, + clean_params, + get_main_estimator, + get_module, get_scoring, load_model, read_columns, + SafeEval, try_get_attr, - get_module, - clean_params, - get_main_estimator, ) +from scipy.io import mmread +from sklearn.metrics.scorer import _check_multimetric_scoring +from sklearn.model_selection import _search, _validation +from sklearn.model_selection._validation import _score +from sklearn.pipeline import Pipeline +from sklearn.utils import indexable, safe_indexing _fit_and_score = try_get_attr("galaxy_ml.model_validations", "_fit_and_score") @@ -104,7 +104,7 @@ rval = train_test_split(*new_arrays, **kwargs) for pos in nones: - rval[pos * 2 : 2] = [None, None] + rval[pos * 2: 2] = [None, None] return rval |
b |
diff -r 4aa701f5a393 -r 22f9cbcf1582 ml_visualization_ex.py --- a/ml_visualization_ex.py Tue Apr 13 18:00:54 2021 +0000 +++ b/ml_visualization_ex.py Tue Apr 13 21:54:09 2021 +0000 |
b |
@@ -1,21 +1,20 @@ import argparse import json +import os +import warnings + import matplotlib import matplotlib.pyplot as plt import numpy as np -import os import pandas as pd import plotly import plotly.graph_objs as go -import warnings - +from galaxy_ml.utils import load_model, read_columns, SafeEval from keras.models import model_from_json from keras.utils import plot_model from sklearn.feature_selection.base import SelectorMixin -from sklearn.metrics import precision_recall_curve, average_precision_score -from sklearn.metrics import roc_curve, auc, confusion_matrix +from sklearn.metrics import auc, average_precision_score, confusion_matrix, precision_recall_curve, roc_curve from sklearn.pipeline import Pipeline -from galaxy_ml.utils import load_model, read_columns, SafeEval safe_eval = SafeEval() |
b |
diff -r 4aa701f5a393 -r 22f9cbcf1582 model_prediction.py --- a/model_prediction.py Tue Apr 13 18:00:54 2021 +0000 +++ b/model_prediction.py Tue Apr 13 21:54:09 2021 +0000 |
b |
@@ -4,13 +4,10 @@ import numpy as np import pandas as pd +from galaxy_ml.utils import get_module, load_model, read_columns, try_get_attr from scipy.io import mmread from sklearn.pipeline import Pipeline -from galaxy_ml.utils import (get_module, load_model, - read_columns, try_get_attr) - - N_JOBS = int(__import__("os").environ.get("GALAXY_SLOTS", 1)) |
b |
diff -r 4aa701f5a393 -r 22f9cbcf1582 search_model_validation.py --- a/search_model_validation.py Tue Apr 13 18:00:54 2021 +0000 +++ b/search_model_validation.py Tue Apr 13 21:54:09 2021 +0000 |
b |
@@ -1,15 +1,27 @@ import argparse import collections +import json +import os +import pickle +import sys +import warnings + import imblearn import joblib -import json import numpy as np -import os import pandas as pd -import pickle import skrebate -import sys -import warnings +from galaxy_ml.utils import ( + clean_params, + get_cv, + get_main_estimator, + get_module, + get_scoring, + load_model, + read_columns, + SafeEval, + try_get_attr +) from scipy.io import mmread from sklearn import ( cluster, @@ -20,21 +32,8 @@ preprocessing, ) from sklearn.exceptions import FitFailedWarning +from sklearn.model_selection import _search, _validation from sklearn.model_selection._validation import _score, cross_validate -from sklearn.model_selection import _search, _validation -from sklearn.pipeline import Pipeline - -from galaxy_ml.utils import ( - SafeEval, - get_cv, - get_scoring, - load_model, - read_columns, - try_get_attr, - get_module, - clean_params, - get_main_estimator, -) _fit_and_score = try_get_attr("galaxy_ml.model_validations", "_fit_and_score") |
b |
diff -r 4aa701f5a393 -r 22f9cbcf1582 simple_model_fit.py --- a/simple_model_fit.py Tue Apr 13 18:00:54 2021 +0000 +++ b/simple_model_fit.py Tue Apr 13 21:54:09 2021 +0000 |
b |
@@ -1,8 +1,8 @@ import argparse import json -import pandas as pd import pickle +import pandas as pd from galaxy_ml.utils import load_model, read_columns from scipy.io import mmread from sklearn.pipeline import Pipeline |
b |
diff -r 4aa701f5a393 -r 22f9cbcf1582 stacking_ensembles.py --- a/stacking_ensembles.py Tue Apr 13 18:00:54 2021 +0000 +++ b/stacking_ensembles.py Tue Apr 13 21:54:09 2021 +0000 |
b |
@@ -1,13 +1,14 @@ import argparse import ast import json -import mlxtend.regressor -import mlxtend.classifier -import pandas as pd import pickle import sys import warnings -from galaxy_ml.utils import load_model, get_cv, get_estimator, get_search_params + +import mlxtend.classifier +import mlxtend.regressor +import pandas as pd +from galaxy_ml.utils import get_cv, get_estimator, get_search_params, load_model warnings.filterwarnings("ignore") |
b |
diff -r 4aa701f5a393 -r 22f9cbcf1582 train_test_eval.py --- a/train_test_eval.py Tue Apr 13 18:00:54 2021 +0000 +++ b/train_test_eval.py Tue Apr 13 21:54:09 2021 +0000 |
b |
@@ -3,7 +3,6 @@ import os import pickle import warnings - from itertools import chain import joblib @@ -21,7 +20,6 @@ from scipy.io import mmread from sklearn import pipeline from sklearn.metrics.scorer import _check_multimetric_scoring -from sklearn.model_selection._validation import _score from sklearn.model_selection import _search, _validation from sklearn.model_selection._validation import _score from sklearn.utils import indexable, safe_indexing |
b |
diff -r 4aa701f5a393 -r 22f9cbcf1582 train_test_split.py --- a/train_test_split.py Tue Apr 13 18:00:54 2021 +0000 +++ b/train_test_split.py Tue Apr 13 21:54:09 2021 +0000 |
b |
@@ -1,8 +1,8 @@ import argparse import json -import pandas as pd import warnings +import pandas as pd from galaxy_ml.model_validations import train_test_split from galaxy_ml.utils import get_cv, read_columns |