def __init__(self, datainfo, timeinfo): ''' This constructor is supposed to initialize data members. Use triple quotes for function documentation. ''' # Just print some info from the datainfo variable print( "The Budget for this data set is: %d seconds" % datainfo['time_budget'], 'name:', datainfo['name']) print("Loaded %d time features, %d numerical features, %d categorical " \ "features and %d multi valued categorical variables" \ %(datainfo['loaded_feat_types'][0], datainfo['loaded_feat_types'][1],\ datainfo['loaded_feat_types'][2],datainfo['loaded_feat_types'][3])) overall_spenttime = time.time() - timeinfo[0] dataset_spenttime = time.time() - timeinfo[1] print("[***] Overall time spent %5.2f sec" % overall_spenttime) print("[***] Dataset time spent %5.2f sec" % dataset_spenttime) self.num_train_samples = 0 self.num_feat = 1 self.num_labels = 1 self.is_trained = False ### install hyperopt and lightgbm ### #print("AutoGBT[Model]:installing hyperopt and lightgbm...") #setupmgr.pip_install("hyperopt") #setupmgr.pip_install("lightgbm") import StreamProcessor self.mdl = StreamProcessor.StreamSaveRetrainPredictor() self.score = [] self.batch_num = 0
def __init__(self,datainfo): ''' This constructor is supposed to initialize data members. Use triple quotes for function documentation. ''' # Just print some info from the datainfo variable self.num_train_samples=0 self.num_feat=1 self.num_labels=1 self.is_trained=False ### install hyperopt and lightgbm ### print("AutoGBT[Model]:installing hyperopt and lightgbm...") setupmgr.pip_install("hyperopt") setupmgr.pip_install("lightgbm") import StreamProcessor self.mdl = StreamProcessor.StreamSaveRetrainPredictor()