PYFTS / pyFTS

An open source library for Fuzzy Time Series in Python
http://pyfts.github.io/pyFTS/
GNU General Public License v3.0
262 stars 54 forks source link

Fuzzyfication with Huarng Partitioner not woking (with fix for this) #41

Open Th0m4sR opened 3 years ago

Th0m4sR commented 3 years ago

My Huarng partitioner constists of 130 Fuzzy Sets and when I try to fit a model it says the item has to be between 0 and 10. That is, the number of partitions within the partitioner is always set to 10 by default in all partitioners.

I wanted to fit a Chen model by using

partitioner = Huarng.HuarngPartitioner(data=train, mf=mf.trimf)
model = chen.ConventionalFTS(partitioner=partitioner)
model.fit(train)

and received the described error.

The issue can be fixed by adding: self.partitions=npart after line 39 in Huarng.py before the for loop.

This fixed this issue for me and it adapts the correct number of partitions.

Kind regards, Th0m4sR