-
Notifications
You must be signed in to change notification settings - Fork 8
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
Wrong evaluation at limit of trapezoid #74
Comments
Hi I will investigate this as soon as possible. Sorry for the inconvenience. |
you are right about the right corner. But it is kind of connected to the fact that this is a special trapezoid on the side: the last two X coordinates are the same. Since these are the outer limits, you can always choose (7, 8, 10, 11) and (7.5, 8.5, 10, 11) to get the result from a trapezoid you want in your case Another working solution would be to use a triangle as outer bound or stacking 2 triangles here. it is basically what you want to express here. looking at trapezoid edge cases I am thinking I missed those as the whole api is a very very basic implementation. |
Thanks a lot for this explanation, I used the trapezoid with 10.1 coordinate and I am having a working solution, I will try the triangle solution also. Instead of the code that I posted above, I have developed a class that would make the code much cleaner, I can send you the code and maybe if you like it, I can contribute it to your nice framework so that the user can concentrate only on the rules. ([email protected]) Thanks |
fork it and contribute back .... we can talk about any proposal. Maybe start small and then get bigger. I think I will have to talk to someone who actually saw a university from inside and enjoyed maths (looking at your cv this might be you) if I can pick the 1 in our case (and what to do with the other trapezoid forms). |
will keep this open until I have at least added a explanation and documentation. |
I will fork it as you said, and show you the "small" contribution, it is a simple way to associate rules to evaluations to outputs (3-tuples of { rule, evaluation, output } ) + a batch evaluation loop that would fill the evaluation member, which makes the client code much shorter than the one I have added above. |
This comment from @JK-0 came to email from [email protected]. It's also not the first spam email I've received recently. Most are for crypto nonsense, others are for repos I've never interacted with or seen. If I unsubscribe from [email protected] I assume I'll miss out on real and needed emails. Has anyone else experienced this before? |
Hi,
I am trying to use this library, the fuzzification is quite clear but the defuzzification step is not clear to me using this library, anyways, I have this code that gives a wrong evaluation at the upper limit of a trapezoid, It seems to come from this library not from boon-js:
I have this function with two input fuzzy variables (likelihood and impact), the fifth evaluator function is the one that returns True when the input is assess(5, 10), while 10 as a value for impact should trigger the seventh evaluator to return true (securityTest_moderate_restricted ) and this should lead to have the function an output of "high", I tried to slightly modify the trapezoid declaration to make it work by cheating a little bit and pushing the last point of the trapezoid to 11: const restrictedImpact = new fuzzy.Trapezoid(7.5, 8.5, 10, 11);
And this gave me a correct result, which makes me think that there is a problem at the higher limit of the trapezoid.
Thanks,
This is the function:
The text was updated successfully, but these errors were encountered: