Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def setUp(self):
self.rf_trainer_metarf = Model(drop_rate=1,
verbose=3,
algo='RandomForestRegressor',
meta_algo='RF')
self.svc_trainer_metarf = Model(drop_rate=1,
verbose=3, algo='SVC', meta_algo='RF')
self.km_trainer_metarf = Model(drop_rate=1,
verbose=3, algo='KMeans',
meta_algo='RF')
self.rf_trainer_metann = Model(drop_rate=1,
verbose=3, algo='RandomForestRegressor',
meta_algo='NN')
self.svc_trainer_metann = Model(drop_rate=1,
verbose=3, algo='SVC', meta_algo='NN')
self.km_trainer_metann = Model(drop_rate=1,
verbose=3, algo='KMeans',
meta_algo='NN')
def setUp(self):
self.rf_trainer_metarf = Model(drop_rate=1,
verbose=3,
algo='RandomForestRegressor',
meta_algo='RF')
self.svc_trainer_metarf = Model(drop_rate=1,
verbose=3, algo='SVC', meta_algo='RF')
self.km_trainer_metarf = Model(drop_rate=1,
verbose=3, algo='KMeans',
meta_algo='RF')
self.rf_trainer_metann = Model(drop_rate=1,
verbose=3, algo='RandomForestRegressor',
meta_algo='NN')
self.svc_trainer_metann = Model(drop_rate=1,
verbose=3, algo='SVC', meta_algo='NN')
self.km_trainer_metann = Model(drop_rate=1,
verbose=3, algo='KMeans',
meta_algo='NN')
verbose=3,
algo='RandomForestRegressor',
meta_algo='RF')
self.svc_trainer_metarf = Model(drop_rate=1,
verbose=3, algo='SVC', meta_algo='RF')
self.km_trainer_metarf = Model(drop_rate=1,
verbose=3, algo='KMeans',
meta_algo='RF')
self.rf_trainer_metann = Model(drop_rate=1,
verbose=3, algo='RandomForestRegressor',
meta_algo='NN')
self.svc_trainer_metann = Model(drop_rate=1,
verbose=3, algo='SVC', meta_algo='NN')
self.km_trainer_metann = Model(drop_rate=1,
verbose=3, algo='KMeans',
meta_algo='NN')
def setUp(self):
self.rf_trainer_metarf = Model(drop_rate=1,
verbose=3,
algo='RandomForestRegressor',
meta_algo='RF')
self.svc_trainer_metarf = Model(drop_rate=1,
verbose=3, algo='SVC', meta_algo='RF')
self.km_trainer_metarf = Model(drop_rate=1,
verbose=3, algo='KMeans',
meta_algo='RF')
self.rf_trainer_metann = Model(drop_rate=1,
verbose=3, algo='RandomForestRegressor',
meta_algo='NN')
self.svc_trainer_metann = Model(drop_rate=1,
self.svc_trainer_metarf = Model(drop_rate=1,
verbose=3, algo='SVC', meta_algo='RF')
self.km_trainer_metarf = Model(drop_rate=1,
verbose=3, algo='KMeans',
meta_algo='RF')
self.rf_trainer_metann = Model(drop_rate=1,
verbose=3, algo='RandomForestRegressor',
meta_algo='NN')
self.svc_trainer_metann = Model(drop_rate=1,
verbose=3, algo='SVC', meta_algo='NN')
self.km_trainer_metann = Model(drop_rate=1,
verbose=3, algo='KMeans',
meta_algo='NN')
def setUp(self):
self.rf_trainer_metarf = Model(drop_rate=1,
verbose=3,
algo='RandomForestRegressor',
meta_algo='RF')
self.svc_trainer_metarf = Model(drop_rate=1,
verbose=3, algo='SVC', meta_algo='RF')
self.km_trainer_metarf = Model(drop_rate=1,
verbose=3, algo='KMeans',
meta_algo='RF')
self.rf_trainer_metann = Model(drop_rate=1,
verbose=3, algo='RandomForestRegressor',
meta_algo='NN')
self.svc_trainer_metann = Model(drop_rate=1,
verbose=3, algo='SVC', meta_algo='NN')
self.km_trainer_metann = Model(drop_rate=1,
verbose=3, algo='KMeans',
meta_algo='NN')
if args.verbose is None:
verbose = 1
else:
verbose = int(args.verbose)
if args.meta_algo is None:
meta_algo = 'RF'
else:
meta_algo = args.meta_algo
if args.algo is None:
algo = 'RandomForestRegressor'
else:
algo = args.algo
m = Model(drop_rate=drop_rate, algo=algo,
meta_algo=meta_algo, verbose=verbose)
if args.generate_data:
m._generate_data(write_csv=True)
if args.fit is not None:
csv_name = args.fit
m.model_fit(generate_data=False,
csv_name=csv_name, save_model=args.save)