Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
441 views
in Technique[技术] by (71.8m points)

fuzzy search - How do i use Crisp variables in skfuzzy python library?

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()```
question from:https://stackoverflow.com/questions/66056466/how-do-i-use-crisp-variables-in-skfuzzy-python-library

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...