Spaces:
Sleeping
Sleeping
File size: 2,427 Bytes
6f4f21f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
import pandas as pd
class CATEConversionEvaluateSimulationReady:
def __init__(self,data_path):
self.data_path = data_path
def evaluate(self, discount_group):
if discount_group == 5:
qini_05_conversion_test = pd.read_csv(self.data_path + 'qini_05_conversion_test.csv').drop(columns='Unnamed: 0')
qini_05_benefit_test = pd.read_csv(self.data_path + 'qini_05_benefit_test.csv').drop(columns='Unnamed: 0')
return qini_05_conversion_test, qini_05_benefit_test
elif discount_group == 10:
qini_10_conversion_test = pd.read_csv(self.data_path + 'qini_10_conversion_test.csv').drop(columns='Unnamed: 0')
qini_10_benefit_test = pd.read_csv(self.data_path + 'qini_10_benefit_test.csv').drop(columns='Unnamed: 0')
return qini_10_conversion_test, qini_10_benefit_test
elif discount_group == 15:
qini_15_conversion_test = pd.read_csv(self.data_path + 'qini_15_conversion_test.csv').drop(columns='Unnamed: 0')
qini_15_benefit_test = pd.read_csv(self.data_path + 'qini_15_benefit_test.csv').drop(columns='Unnamed: 0')
return qini_15_conversion_test, qini_15_benefit_test
class CATEBenefitEvaluateSimulationReady:
def __init__(self,data_path):
self.data_path = data_path
def evaluate(self, discount_group):
if discount_group == 5:
qini_05_conversion_test = pd.read_csv(self.data_path + 'qini_05_conversion_test_bate.csv').drop(columns='Unnamed: 0')
qini_05_benefit_test = pd.read_csv(self.data_path + 'qini_05_benefit_test_bate.csv').drop(columns='Unnamed: 0')
return qini_05_conversion_test, qini_05_benefit_test
elif discount_group == 10:
qini_10_conversion_test = pd.read_csv(self.data_path + 'qini_10_conversion_test_bate.csv').drop(columns='Unnamed: 0')
qini_10_benefit_test = pd.read_csv(self.data_path + 'qini_10_benefit_test_bate.csv').drop(columns='Unnamed: 0')
return qini_10_conversion_test, qini_10_benefit_test
elif discount_group == 15:
qini_15_conversion_test = pd.read_csv(self.data_path + 'qini_15_conversion_test_bate.csv').drop(columns='Unnamed: 0')
qini_15_benefit_test = pd.read_csv(self.data_path + 'qini_15_benefit_test_bate.csv').drop(columns='Unnamed: 0')
return qini_15_conversion_test, qini_15_benefit_test
|