diff --git a/.travis.yml b/.travis.yml index 8b13789..e69de29 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1 +0,0 @@ - diff --git a/raredecay/analysis/compatibility_tools.py b/raredecay/analysis/compatibility_tools.py index 5248591..8e92596 100644 --- a/raredecay/analysis/compatibility_tools.py +++ b/raredecay/analysis/compatibility_tools.py @@ -8,7 +8,6 @@ """ - from raredecay.tools import dev_tool diff --git a/raredecay/analysis/ml_analysis.py b/raredecay/analysis/ml_analysis.py index 7ea8d96..e35493c 100644 --- a/raredecay/analysis/ml_analysis.py +++ b/raredecay/analysis/ml_analysis.py @@ -20,6 +20,7 @@ The functions serve as basic tools, which do already a lot of the work. """ + import copy import timeit import warnings @@ -1379,6 +1380,7 @@ def mcreweighted_as_real( # collect all the new weights to get a really cross-validated reweighted dataset + # COMPATIBILITY LAYER START # OLD FUNCTION, DEPRECEATED def reweight_Kfold( diff --git a/raredecay/analysis/physical_analysis.py b/raredecay/analysis/physical_analysis.py index 2f58a3b..41b6546 100644 --- a/raredecay/analysis/physical_analysis.py +++ b/raredecay/analysis/physical_analysis.py @@ -16,7 +16,6 @@ values. """ - import copy import matplotlib.pyplot as plt diff --git a/raredecay/config.py b/raredecay/config.py index b88fffe..fd08988 100644 --- a/raredecay/config.py +++ b/raredecay/config.py @@ -6,7 +6,6 @@ @author: Jonas Eschle "Mayou36" """ - __all__ = ["RUN_NAME", "run_message", "OUTPUT_CFG", "save_fig_cfg", "logger_cfg"] RUN_NAME = "Default run name" diff --git a/raredecay/data.py b/raredecay/data.py index 796341f..619deec 100644 --- a/raredecay/data.py +++ b/raredecay/data.py @@ -4,7 +4,6 @@ """ - from raredecay.analysis.physical_analysis import add_branch_to_rootfile from raredecay.tools.data_storage import HEPDataStorage from raredecay.tools.data_tools import adv_return, make_root_dict, to_list, try_unpickle diff --git a/raredecay/globals_.py b/raredecay/globals_.py index 07a7928..8f2dd7c 100644 --- a/raredecay/globals_.py +++ b/raredecay/globals_.py @@ -47,7 +47,6 @@ can be extended if wanted """ - from . import config as cfg from . import meta_config as meta_cfg from .tools import output diff --git a/raredecay/meta_config.py b/raredecay/meta_config.py index f7da107..590b466 100644 --- a/raredecay/meta_config.py +++ b/raredecay/meta_config.py @@ -242,7 +242,7 @@ def set_parallel_profile(n_cpu=-1, gpu_in_use=False, stratified_kfolding=True): # about but may be happy to have them saved somewhere) DEFAULT_EXT_SAVE_FIG = dict( file_format=["png", "pdf"], - to_pickle=True + to_pickle=True, # save_cfg=None ) diff --git a/raredecay/ml.py b/raredecay/ml.py index c692e82..cb5676e 100644 --- a/raredecay/ml.py +++ b/raredecay/ml.py @@ -4,7 +4,6 @@ """ - try: from raredecay.analysis.ml_analysis import ( backward_feature_elimination, diff --git a/raredecay/reweight.py b/raredecay/reweight.py index 03f2755..bcfb8dd 100644 --- a/raredecay/reweight.py +++ b/raredecay/reweight.py @@ -4,7 +4,6 @@ """ - try: from raredecay.analysis.reweight import reweight, reweight_kfold except Exception as err: diff --git a/raredecay/score.py b/raredecay/score.py index a1e72d7..f56a90b 100644 --- a/raredecay/score.py +++ b/raredecay/score.py @@ -4,7 +4,6 @@ """ - try: from raredecay.analysis.ml_analysis import mcreweighted_as_real from raredecay.tools.ml_scores import mayou_score, train_similar, train_similar_new diff --git a/raredecay/settings.py b/raredecay/settings.py index 8f31ba1..ae8637e 100644 --- a/raredecay/settings.py +++ b/raredecay/settings.py @@ -4,7 +4,6 @@ @author: Jonas Eschle "Mayou36" """ - __all__ = [ "initialize", "finalize", diff --git a/raredecay/tools/__init__.py b/raredecay/tools/__init__.py index 9d9cf36..6c7bdf8 100644 --- a/raredecay/tools/__init__.py +++ b/raredecay/tools/__init__.py @@ -5,4 +5,5 @@ DEPRECEATED!DEPRECEATED!DEPRECEATED!DEPRECEATED!DEPRECEATED! """ + # diff --git a/raredecay/tools/data_storage.py b/raredecay/tools/data_storage.py index 635749c..6df5e13 100644 --- a/raredecay/tools/data_storage.py +++ b/raredecay/tools/data_storage.py @@ -12,7 +12,6 @@ takes data, weights, targets, names and converts automatically, plots and more. """ - import copy import math import random diff --git a/raredecay/tools/data_tools.py b/raredecay/tools/data_tools.py index a9652cb..f7d6ac7 100644 --- a/raredecay/tools/data_tools.py +++ b/raredecay/tools/data_tools.py @@ -11,7 +11,6 @@ Contains several tools to convert, load, save and plot data """ - import copy import os import pickle diff --git a/raredecay/tools/dev_tool.py b/raredecay/tools/dev_tool.py index c73d72d..fa0a303 100644 --- a/raredecay/tools/dev_tool.py +++ b/raredecay/tools/dev_tool.py @@ -11,7 +11,6 @@ Contains several useful tools for all kind of programs """ - import collections import numpy as np diff --git a/raredecay/tools/metrics.py b/raredecay/tools/metrics.py index 288450c..cf163a3 100644 --- a/raredecay/tools/metrics.py +++ b/raredecay/tools/metrics.py @@ -9,7 +9,6 @@ """ - import math as mt import numpy as np diff --git a/raredecay/tools/output.py b/raredecay/tools/output.py index bf9e9f8..7c89813 100644 --- a/raredecay/tools/output.py +++ b/raredecay/tools/output.py @@ -9,7 +9,6 @@ """ - import copy import io as StringIO import os diff --git a/requirements.txt b/requirements.txt index 7ed1e29..ae1ebf6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,9 +3,9 @@ hep_ml>=0.5.0 matplotlib numpy pandas -scipy rep @ git+https://github.com/REPlegacy/rep scikit-learn~=0.19.0 # otherwise, breaks REP +scipy seaborn uproot xgboost<1.3 # TODO: negative weights and xgboost don't go well, error in 1.3+ diff --git a/scripts_readyToUse/reweightCV_score_example.py b/scripts_readyToUse/reweightCV_score_example.py index 4e2a94a..58444ef 100644 --- a/scripts_readyToUse/reweightCV_score_example.py +++ b/scripts_readyToUse/reweightCV_score_example.py @@ -8,6 +8,7 @@ The raredecay package is available at https://github.com/mayou36/raredecay """ + from raredecay import settings # first of all, it is advised to set some run-configurations like logger-level,