Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError: Total area is zero in defuzzification! #1

Open
yashguptaab99 opened this issue Oct 7, 2020 · 0 comments
Open

AssertionError: Total area is zero in defuzzification! #1

yashguptaab99 opened this issue Oct 7, 2020 · 0 comments

Comments

@yashguptaab99
Copy link


AssertionError Traceback (most recent call last)
in ()
63
64 # Calculate defuzzified result
---> 65 op = fuzz.defuzz(x_op, aggregated, 'centroid')
66 output=round(op,2)
67

/usr/local/lib/python3.6/dist-packages/skfuzzy/defuzzify/defuzz.py in defuzz(x, mfx, mode)
246 if 'centroid' in mode or 'bisector' in mode:
247 zero_truth_degree = mfx.sum() == 0 # Approximation of total area
--> 248 assert not zero_truth_degree, 'Total area is zero in defuzzification!'
249
250 if 'centroid' in mode:

AssertionError: Total area is zero in defuzzification!

running the same code for dataset Sentiment140 giving above error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant