(self, path, ratio)
:param
            path: the path of dataset
            ratio: the ritio of oversample
:param
            path: the path of dataset
            ratio: the ritio of oversample
: param path : the path of dataset ratio : the ritio of oversample
def __init__(self, path, ratio):
        """
            :param
            path: the path of dataset
            ratio: the ritio of oversample
        """
        self.path = path
        file = open(self.path, 'r')
        self.lines = file.readlines()
        file.close()
        self.categorical_columns = 50
        self.numerical_columns = 6
        self.maxnum_events = 11  # 10 historical event 1 target payment event
        self.nb_features_per_event = self.categorical_columns + self.numerical_columns

        length = len(self.lines)
        self.weight = []
        black_num = 0
        for i in range(length):
            tmp = self.lines[i].split(' ')
            if int(tmp[2]) == 1:
                self.weight.append(ratio)
                black_num += 1
            else:
                self.weight.append(1)
        print(path, 'black num:', black_num, 'white num:', length - black_num)
def __init__ ( self , path , ratio ) : self . path = path file = open ( self . path , 'r' ) self . lines = file . readlines ( ) file . close ( ) self . categorical_columns = 50 self . numerical_columns = 6 self . maxnum_events = 11 # 10 historical event 1 target payment event self . nb_features_per_event = self . categorical_columns + self . numerical_columns length = len ( self . lines ) self . weight = [ ] black_num = 0 for i in range ( length ) : tmp = self . lines [ i ] . split ( ' ' ) if int ( tmp [ 2 ] ) == 1 : self . weight . append ( ratio ) black_num += 1 else : self . weight . append ( 1 ) print ( path , 'black num:' , black_num , 'white num:' , length - black_num )