I m biulding a model using skfuzzy, python library, but in my problem i have crisp and fuzzy variables, how can i include this crisp variables in my calculation? for exemple: i have a age variable, this is fuzzy, but i have a smoke variable, that is crisp because the answer is "yes" or "no" only, how can i add this in the model? I have tried to biuld a variable, but i did not have sucess cause i did not find a way to do this in skfuzzy.
import skfuzzy as fuzz
from skfuzzy import control as ctrl
idade = ctrl.Antecedent(np.arange(0, 101, 1), 'idade')
idade['muito jovem'] = fuzz.trapmf(idade.universe, [0, 0, 13, 20])
idade['jovem'] = fuzz.trapmf(idade.universe, [15, 22, 28, 35])
idade['moderado'] = fuzz.trapmf(idade.universe, [30, 37, 48, 55])
idade['avançado'] = fuzz.trapmf(idade.universe, [50, 57, 73, 80])
idade['muito avançado'] = fuzz.trapmf(idade.universe, [75, 82, 97, 100])
#idade.view()```
I suggest that you convert your smoke variable which is crisp value to
fuzzy
by declaring a universe say1 to 10
then split the variable into two with1 to 5
for aYes
and6 to 10
for aNo
. The following is an example:Your step value can be
5 or 1
and this would allow you to use it infuzzy
control system.