continuous functions

This commit is contained in:
Steve Nyemba 2021-04-01 13:38:28 -05:00
parent a73e186f77
commit 5b2aeb0e3e
1 changed files with 9 additions and 4 deletions

View File

@ -142,10 +142,15 @@ class Components :
# #
# We need to make sure that continuous columns are removed # We need to make sure that continuous columns are removed
if x_cols : if x_cols :
_args['data'] = df[list(set(df.columns) - set(x_cols))] _args['data'] = _args['data'][list(set(df.columns) - set(x_cols))]
if 'gpu' in args : if 'gpu' in args :
_args['gpu'] = self.set_gpu(gpu=args['gpu']) _args['gpu'] = self.set_gpu(gpu=args['gpu'])
if df.shape[0] and df.shape[0] :
#
# We have a full blown matrix to be processed
data.maker.train(**_args) data.maker.train(**_args)
else:
print ("... skipping training !!")
if 'autopilot' in ( list(args.keys())) : if 'autopilot' in ( list(args.keys())) :
@ -216,7 +221,7 @@ class Components :
_dc = pd.DataFrame() _dc = pd.DataFrame()
# for mdf in df : # for mdf in df :
args['data'] = df args['data'] = df.copy()
# #
# The columns that are continuous should also be skipped because they don't need to be synthesied (like-that) # The columns that are continuous should also be skipped because they don't need to be synthesied (like-that)
if 'continuous' in args : if 'continuous' in args :
@ -232,7 +237,7 @@ class Components :
# @TODO: Abstract this !! # @TODO: Abstract this !!
# #
if x_cols : if x_cols :
args['data'] = df[list(set(df.columns) - set(x_cols))] args['data'] = args['data'][list(set(df.columns) - set(x_cols))]
args['candidates'] = 1 if 'candidates' not in args else int(args['candidates']) args['candidates'] = 1 if 'candidates' not in args else int(args['candidates'])
if 'gpu' in args : if 'gpu' in args :