def setUp(self): TestCalculator.setUp(self) self.calculations = [ # constants '-9 + 5', # aliases 'rating', 'gps', # arithmetic 'amount + gps_alt', 'amount - gps_alt', 'amount + 5', 'amount - gps_alt + 2.5', 'amount * gps_alt', 'amount / gps_alt', 'amount * gps_alt / 2.5', 'amount + gps_alt * gps_precision', # precedence '(amount + gps_alt) * gps_precision', # comparison 'amount == 2', '10 < amount', '10 < amount + gps_alt', # logical 'not amount == 2', 'not(amount == 2)', 'amount == 2 and 10 < amount', 'amount == 2 or 10 < amount', 'not not amount == 2 or 10 < amount', 'not amount == 2 or 10 < amount', '(not amount == 2) or 10 < amount', 'not(amount == 2 or 10 < amount)', 'amount ^ 3', '(amount + gps_alt) ^ 2 + 100', '-amount', '-amount < gps_alt - 100', # membership 'rating in ["delectible"]', 'risk_factor in ["low_risk"]', 'amount in ["9.0", "2.0", "20.0"]', '(risk_factor in ["low_risk"]) and (amount in ["9.0", "20.0"])', # dates 'date("09-04-2012") - submit_date > 21078000', # cases 'case food_type in ["morning_food"]: 1, food_type in ["lunch"]: 2,' ' default: 3', 'case food_type in ["morning_food"]: 1, food_type in ["lunch"]: 2', # row-wise column-based aggregations 'percentile(amount)', ]
def setUp(self): TestCalculator.setUp(self) self.calculations = [ 'max(amount)', 'mean(amount)', 'median(amount)', 'min(amount)', 'sum(amount)', 'sum(gps_latitude)', 'ratio(amount, gps_latitude)', 'sum(risk_factor in ["low_risk"])', 'ratio(risk_factor in ["low_risk"], risk_factor in ["low_risk",' ' "medium_risk"])', 'ratio(risk_factor in ["low_risk"], 1)', 'count(risk_factor in ["low_risk"])', 'count()', 'argmax(submit_date)', 'newest(submit_date, amount)', ] self.expected_length = defaultdict(int) self.groups_list = None
def setUp(self): TestCalculator.setUp(self) self.calculations = [ "pearson(gps_latitude, amount)", "var(amount)", "std(amount)", "max(amount)", "mean(amount)", "median(amount)", "min(amount)", "sum(amount)", "sum(gps_latitude)", "ratio(amount, gps_latitude)", 'sum(risk_factor in ["low_risk"])', 'ratio(risk_factor in ["low_risk"], risk_factor in ["low_risk",' ' "medium_risk"])', 'ratio(risk_factor in ["low_risk"], 1)', 'count(risk_factor in ["low_risk"])', "count()", "argmax(submit_date)", "newest(submit_date, amount)", ] self.expected_length = defaultdict(int) self.groups_list = None
def setUp(self): TestCalculator.setUp(self) self.calculations = AGG_CALCS_TO_DEPS.keys() self.expected_length = defaultdict(int) self.groups_list = None
def setUp(self): TestCalculator.setUp(self) self.calculations = CALCS_TO_DEPS.keys() self.dynamic_calculations = DYNAMIC
def setUp(self): TestCalculator.setUp(self) self.calculations = CALCS_TO_DEPS.keys()