|
|
|
@ -248,7 +248,7 @@ class Learner(Process):
|
|
|
|
|
_args = {"schema":self.get_schema(),"data":self._df,"columns":columns}
|
|
|
|
|
if self._map :
|
|
|
|
|
_args['map'] = self._map
|
|
|
|
|
self._encoder = prepare.Input(**_args)
|
|
|
|
|
self._encoder = prepare.Input(**_args) if self._df.shape[0] > 0 else None
|
|
|
|
|
class Trainer(Learner):
|
|
|
|
|
"""
|
|
|
|
|
This will perform training using a GAN
|
|
|
|
@ -263,6 +263,10 @@ class Trainer(Learner):
|
|
|
|
|
self.candidates = int(_args['candidates']) if 'candidates' in _args else 1
|
|
|
|
|
def run(self):
|
|
|
|
|
self.initalize()
|
|
|
|
|
if self._encoder is None :
|
|
|
|
|
#
|
|
|
|
|
# @TODO Log that the dataset was empty or not statistically relevant
|
|
|
|
|
return
|
|
|
|
|
_space,_matrix = self._encoder.convert()
|
|
|
|
|
|
|
|
|
|
_args = self.network_args
|
|
|
|
@ -311,9 +315,15 @@ class Generator (Learner):
|
|
|
|
|
file.close()
|
|
|
|
|
def run(self):
|
|
|
|
|
self.initalize()
|
|
|
|
|
if self._encoder is None :
|
|
|
|
|
#
|
|
|
|
|
# @TODO Log that the dataset was empty or not statistically relevant
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# The values will be returned because we have provided _map information from the constructor
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
values,_matrix = self._encoder.convert()
|
|
|
|
|
_args = self.network_args
|
|
|
|
|
_args['map'] = self._map
|
|
|
|
|