spaces between functions and before the class are changed accordin to PEP8
import logging
import re
import warnings
-import json
import numpy as np
import pandas as pd
@@ -24,6 +23,7 @@ warnings.simplefilter('always', UserWarning)
logger = logging.getLogger(__name__)
+
# TODO: add filtering functionality: we should be able to operate on this
# class to exclude data points, and save all these operations in a log that then
# is preserved in all results.
@@ -81,8 +81,6 @@ class Experiment(object):
self.data.loc[:, name] = eval(re.sub(kpi_name_pattern, r'self.data.\1.astype(float)', formula))
self.reference_kpis[name] = re.sub(kpi_name_pattern + '/', '', formula)
-
-
def get_kpi_by_name_and_variant(self, name, variant):
return self.data.reset_index().set_index('variant').loc[variant, name]
@@ -96,7 +94,6 @@ class Experiment(object):
for k in variants]))
return res
-
def _get_weights(self, kpi, variant):
if kpi not in self.reference_kpis:
return 1.0
