Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception on Chen - ConventionalFTS.ipynb #2

Open
wangtieqiao opened this issue Sep 30, 2019 · 1 comment
Open

Exception on Chen - ConventionalFTS.ipynb #2

wangtieqiao opened this issue Sep 30, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@wangtieqiao
Copy link

I downloaded the notebook and changed cell 9,( after section 1.4 Partitioning) to use the local node (not use distributed setup) and I got exceptions

from pyFTS.partitioners import Grid, Util as pUtil
from pyFTS.benchmarks import benchmarks as bchmk
from pyFTS.models import chen

tag = 'chen_partitioning'
_type = 'point'

for dataset_name in dataset_names:
    dataset = get_dataset(dataset_name)

    bchmk.sliding_window_benchmarks(dataset, 1000, train=0.8, inc=0.2,
                                    methods=[chen.ConventionalFTS],
                                    benchmark_models=False,
                                    transformations=[None],
                                    partitions=np.arange(10,100,2), 
                                    progress=False, type=_type,
                                    distributed=False,# nodes=['192.168.0.110', '192.168.0.107','192.168.0.106'],
                                    file="benchmarks.db", dataset=dataset_name, tag=tag)

    bchmk.sliding_window_benchmarks(dataset, 1000, train=0.8, inc=0.2,
                                    methods=[chen.ConventionalFTS],
                                    benchmark_models=False,
                                    transformations=[tdiff],
                                    partitions=np.arange(3,30,1), 
                                    progress=False, type=_type,
                                    distributed=False,# nodes=['192.168.0.110', '192.168.0.107', '192.168.0.106'],
                                    file="benchmarks.db", dataset=dataset_name, tag=tag)

EXCEPTION! CFTS 1 Grid 27 Differential(1)
Traceback (most recent call last):
File "/home/steve/anaconda3/lib/python3.7/site-packages/pyFTS/benchmarks/benchmarks.py", line 281, in sliding_window_benchmarks
job = experiment_method(deepcopy(model), deepcopy(partitioner), train, test, **kwargs)
File "/home/steve/anaconda3/lib/python3.7/site-packages/pyFTS/benchmarks/benchmarks.py", line 367, in run_point
mfts.fit(train_data, **kwargs)
File "/home/steve/anaconda3/lib/python3.7/site-packages/pyFTS/common/fts.py", line 384, in fit
self.train(mdata, **kwargs)
File "/home/steve/anaconda3/lib/python3.7/site-packages/pyFTS/models/chen.py", line 53, in train
tmpdata = self.partitioner.fuzzyfy(data, method='maximum', mode='sets')
File "/home/steve/anaconda3/lib/python3.7/site-packages/pyFTS/partitioners/partitioner.py", line 144, in fuzzyfy
mv = self.fuzzyfy(inst, **kwargs)
File "/home/steve/anaconda3/lib/python3.7/site-packages/pyFTS/partitioners/partitioner.py", line 157, in fuzzyfy
tmp = self[ix].membership(data)
File "/home/steve/anaconda3/lib/python3.7/site-packages/pyFTS/partitioners/partitioner.py", line 288, in getitem
raise ValueError("The fuzzy set index must be between 0 and {}.".format(self.partitions))
ValueError: The fuzzy set index must be between 0 and 27.

@petroniocandido petroniocandido self-assigned this Sep 30, 2019
@petroniocandido petroniocandido added the bug Something isn't working label Sep 30, 2019
@petroniocandido
Copy link
Contributor

Hi! I detected some outdated links in this notebook and I am updating it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants