dev
Steve Nyemba 3 years ago
parent aa41d371f4
commit 88b4fdd861

@ -223,16 +223,22 @@ class Generator (Learner):
# #
# Sometimes messy data has unpleasant surprises # Sometimes messy data has unpleasant surprises
continue 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] = list(values[index] + _values )if np.random.randint(0,2) else list(values[index] - _values)
values[index] = values[index].astype(_type) values[index] = values[index].astype(_type)
x += values.tolist() x += values.tolist()
print (batches)
if x : if x :
_log['input']['identical_percentage'] = 100 * (1 - np.divide( (_df[name].dropna() == x).sum(),_df[name].dropna().size)) _log['input']['identical_percentage'] = 100 * (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) 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) self.log(**_log)
return _df return _df
def make_date(self,**_args) : def make_date(self,**_args) :

Loading…
Cancel
Save