Bugfixes on nonstationary methods
This commit is contained in:
parent
4ba6c16a2f
commit
d980078a8e
@ -6,7 +6,7 @@ import matplotlib.pyplot as plt
|
|||||||
from pyFTS.common import Membership, Util
|
from pyFTS.common import Membership, Util
|
||||||
|
|
||||||
|
|
||||||
def plot_sets(sets, start=0, end=10, step=1, tam=[5, 5], colors=None,
|
def plot_sets(partitioner, start=0, end=10, step=1, tam=[5, 5], colors=None,
|
||||||
save=False, file=None, axes=None, data=None, window_size = 1, only_lines=False):
|
save=False, file=None, axes=None, data=None, window_size = 1, only_lines=False):
|
||||||
|
|
||||||
range = np.arange(start,end,step)
|
range = np.arange(start,end,step)
|
||||||
@ -14,7 +14,8 @@ def plot_sets(sets, start=0, end=10, step=1, tam=[5, 5], colors=None,
|
|||||||
if axes is None:
|
if axes is None:
|
||||||
fig, axes = plt.subplots(nrows=1, ncols=1, figsize=tam)
|
fig, axes = plt.subplots(nrows=1, ncols=1, figsize=tam)
|
||||||
|
|
||||||
for ct, set in enumerate(sets):
|
for ct, key in enumerate(partitioner.ordered_sets):
|
||||||
|
set = partitioner.sets[key]
|
||||||
if not only_lines:
|
if not only_lines:
|
||||||
for t in range:
|
for t in range:
|
||||||
tdisp = t - (t % window_size)
|
tdisp = t - (t % window_size)
|
||||||
@ -61,7 +62,8 @@ def plot_sets_conditional(model, data, start=0, end=10, step=1, tam=[5, 5], colo
|
|||||||
if axes is None:
|
if axes is None:
|
||||||
fig, axes = plt.subplots(nrows=1, ncols=1, figsize=tam)
|
fig, axes = plt.subplots(nrows=1, ncols=1, figsize=tam)
|
||||||
|
|
||||||
for ct, set in enumerate(model.sets):
|
for ct, key in enumerate(model.partitioner.ordered_sets):
|
||||||
|
set = model.partitioner.sets[key]
|
||||||
for t in range:
|
for t in range:
|
||||||
tdisp = model.perturbation_factors(data[t])
|
tdisp = model.perturbation_factors(data[t])
|
||||||
set.perturbate_parameters(tdisp[ct])
|
set.perturbate_parameters(tdisp[ct])
|
||||||
|
Loading…
Reference in New Issue
Block a user