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