Hello,
I've been recently learning python through a course. Everything works smoothly except when I use view method. Anybody having this problem as well?
I even used a sample code in https://pythonhosted.org/scikit-fuzzy/au...-newapi-py.
Any advice is greatly appreciated. Thank you!
I've been recently learning python through a course. Everything works smoothly except when I use view method. Anybody having this problem as well?
I even used a sample code in https://pythonhosted.org/scikit-fuzzy/au...-newapi-py.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import numpy as np import skfuzzy as fuzz from skfuzzy import control as ctrl quality = ctrl.Antecedent(np.arange( 0 , 11 , 1 ), 'quality' ) service = ctrl.Antecedent(np.arange( 0 , 11 , 1 ), 'service' ) tip = ctrl.Consequent(np.arange( 0 , 26 , 1 ), 'tip' ) quality.automf( 3 ) service.automf( 3 ) tip[ 'low' ] = fuzz.trimf(tip.universe, [ 0 , 0 , 13 ]) tip[ 'medium' ] = fuzz.trimf(tip.universe, [ 0 , 13 , 25 ]) tip[ 'high' ] = fuzz.trimf(tip.universe, [ 13 , 25 , 25 ]) # HERE COMES MY PROBLEM quality[ 'average' ].view() |