|
|
|
@ -223,16 +223,22 @@ class Generator (Learner):
|
|
|
|
|
#
|
|
|
|
|
# Sometimes messy data has unpleasant surprises
|
|
|
|
|
continue
|
|
|
|
|
_values = np.random.dirichlet(values[index].astype(_type))
|
|
|
|
|
|
|
|
|
|
_values = np.random.rand( len(values[index]))
|
|
|
|
|
_values += np.std(values[index]) / 4
|
|
|
|
|
|
|
|
|
|
values[index] = list(values[index] + _values )if np.random.randint(0,2) else list(values[index] - _values)
|
|
|
|
|
values[index] = values[index].astype(_type)
|
|
|
|
|
x += values.tolist()
|
|
|
|
|
print (batches)
|
|
|
|
|
|
|
|
|
|
if x :
|
|
|
|
|
_log['input']['identical_percentage'] = 100 * (1 - np.divide( (_df[name].dropna() == x).sum(),_df[name].dropna().size))
|
|
|
|
|
_df[name] = x #np.array(x,dtype=np.int64) if 'int' in _type else np.arry(x,dtype=np.float64)
|
|
|
|
|
_log['input']['identical_percentage'] = 100 * (np.divide( (_df[name].dropna() == x).sum(),_df[name].dropna().size))
|
|
|
|
|
print (_df[name] == x)
|
|
|
|
|
|
|
|
|
|
print (_log)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_df[name] = x #np.array(x,dtype=np.int64) if 'int' in _type else np.arry(x,dtype=np.float64)
|
|
|
|
|
self.log(**_log)
|
|
|
|
|
return _df
|
|
|
|
|
def make_date(self,**_args) :
|
|
|
|
|