I use pyFTS packages in python. There are several error in previous step like numpy version then I solved it. But, I got another error i.e. AttributeError: 'numpy.ndarray' object has no attribute 'plot' when implement function to visualize rules. My code is like below:
Util.plot_rules(model, size=[15, 5], rules_by_axis=8)
I got the code from this tutorial notebook.
These are complete traceback:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[8], line 1
----> 1 Util.plot_rules(model, size=[15, 5], rules_by_axis=8)
File c:\Users\env_fts_lee\lib\site-packages\pyFTS\common\Util.py:234, in plot_rules(model, size, axis, rules_by_axis, columns)
231 ax = axis
233 if ct % rules_by_axis == 0:
--> 234 draw_sets_on_axis(ax, model, size)
236 if not model.is_high_order:
237 if key in model.flrgs:
File c:\Users\env_fts_lee\lib\site-packages\pyFTS\common\Util.py:285, in draw_sets_on_axis(axis, model, size)
283 for ct, key in enumerate(model.partitioner.ordered_sets):
284 fs = model.sets[key]
--> 285 axis.plot([0, 1, 0], fs.parameters, label=fs.name)
286 axis.axhline(fs.centroid, c="lightgray", alpha=0.5)
287 axis.set_xlim([0, len(model.partitioner.ordered_sets)])
AttributeError: 'numpy.ndarray' object has no attribute 'plot'
I tried to downgrade the matplotlib version, but it doesn't take any effect.