Compare commits

...

4 Commits

4 changed files with 10 additions and 10 deletions

View File

@ -146,7 +146,7 @@ class ClusteredMVFTS(mvfts.MVFTS):
new_data_point[self.target_variable.data_label] = tmp.expected_value()
sample = sample.append(new_data_point, ignore_index=True)
sample = pd.concat([sample, pd.DataFrame([new_data_point])], ignore_index=True)
return ret[-steps:]
@ -199,7 +199,7 @@ class ClusteredMVFTS(mvfts.MVFTS):
for k in np.arange(0, steps):
sample = ret.iloc[k:self.order+k]
tmp = self.forecast_multivariate(sample, **kwargs)
ret = ret.append(tmp, ignore_index=True)
ret = pd.concat([ret, pd.DataFrame([tmp])], ignore_index=True)
return ret

View File

@ -211,7 +211,7 @@ class MVFTS(fts.FTS):
new_data_point[self.target_variable.data_label] = tmp
ndata = ndata.append(new_data_point, ignore_index=True)
ndata = pd.concat([ndata, pd.DataFrame([new_data_point])], ignore_index=True)
return ret[-steps:]
@ -307,8 +307,8 @@ class MVFTS(fts.FTS):
new_data_point_lo[self.target_variable.data_label] = min(tmp_lo)
new_data_point_up[self.target_variable.data_label] = max(tmp_up)
lo = lo.append(new_data_point_lo, ignore_index=True)
up = up.append(new_data_point_up, ignore_index=True)
lo = pd.concat([lo, pd.DataFrame([new_data_point_lo])], ignore_index=True)
up = pd.concat([up, pd.DataFrame([new_data_point_up])], ignore_index=True)
return ret[-steps:]

View File

@ -19,13 +19,13 @@ class HuarngPartitioner(partitioner.Partitioner):
def build(self, data):
diff = Transformations.Differential(1)
data2 = diff.apply(data)
davg = np.abs( np.mean(data2) / 2 )
divs = np.abs( np.mean(data2) / 2 )
if davg <= 1.0:
if divs <= 1.0:
base = 0.1
elif 1 < davg <= 10:
elif 1 < divs <= 10:
base = 1.0
elif 10 < davg <= 100:
elif 10 < divs <= 100:
base = 10
else:
base = 100

View File

@ -47,7 +47,7 @@ class Partitioner(object):
data = kwargs.get('data',[None])
if len(data.shape) > 1:
if isinstance(data, np.ndarray) and len(data.shape) > 1:
warnings.warn(f"An ndarray of dimension greater than 1 is used. shape.len(): {len(data.shape)}")
if self.indexer is not None: