Improvements on hyperparam; Bugfix in mvfts
This commit is contained in:
parent
4742498ec5
commit
a8c05563d4
@ -68,6 +68,8 @@ def process_jobs(jobs, datasetname, conn):
|
||||
record = (datasetname, 'GridSearch', 'WHOFTS', None, result['mf'],
|
||||
result['order'], result['partitioner'], result['npart'],
|
||||
result['alpha'], str(result['lags']), metric, metrics[metric])
|
||||
|
||||
print(record)
|
||||
|
||||
hUtil.insert_hyperparam(record, conn)
|
||||
|
||||
|
@ -38,7 +38,7 @@ class MVFTS(fts.FTS):
|
||||
def apply_transformations(self, data, params=None, updateUoD=False, **kwargs):
|
||||
ndata = data.copy(deep=True)
|
||||
for var in self.explanatory_variables:
|
||||
if self.uod_clip:
|
||||
if self.uod_clip and var.partitioner.type == 'common':
|
||||
ndata[var.data_label] = np.clip(ndata[var.data_label].values,
|
||||
var.partitioner.min, var.partitioner.max)
|
||||
|
||||
|
@ -4,13 +4,14 @@ from pyFTS.hyperparam import GridSearch
|
||||
def get_train_test():
|
||||
from pyFTS.data import Malaysia
|
||||
|
||||
ds = Malaysia.get_data('temperature')[:2000]
|
||||
ds = Malaysia.get_data('temperature')[:1000]
|
||||
# ds = pd.read_csv('Malaysia.csv',delimiter=',' )[['temperature']].values[:2000].flatten().tolist()
|
||||
train = ds[:1000]
|
||||
test = ds[1000:]
|
||||
train = ds[:800]
|
||||
test = ds[800:]
|
||||
|
||||
return 'Malaysia.temperature', train, test
|
||||
|
||||
"""
|
||||
hyperparams = {
|
||||
'order':[1, 2, 3],
|
||||
'partitions': np.arange(10,100,3),
|
||||
@ -19,8 +20,18 @@ hyperparams = {
|
||||
'lags': np.arange(1,35,2),
|
||||
'alpha': np.arange(.0, .5, .05)
|
||||
}
|
||||
"""
|
||||
|
||||
nodes = ['192.168.0.106', '192.168.0.110'] #, '192.168.0.107']
|
||||
hyperparams = {
|
||||
'order':[3], #[1, 2],
|
||||
'partitions': np.arange(10,100,10),
|
||||
'partitioner': [1,2],
|
||||
'mf': [1] ,#, 2, 3, 4],
|
||||
'lags': np.arange(1, 10),
|
||||
'alpha': [.0, .3, .5]
|
||||
}
|
||||
|
||||
nodes = ['192.168.0.106', '192.168.0.110', '192.168.0.107']
|
||||
|
||||
ds, train, test = get_train_test()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user