Comments (3)
Hi Chris,
Thanks for your report.
The code is actually fine. The difference is in the comparison if Op.gt(y, y_max):
for smaller of maximum, and if Op.ge(y, y_max):
for largest of maximum, that is, Op.gt: greater than
and Op.ge: greater than or equal to
.
Say you have this:
______________
_____/ \_____
The smaller of maximum should get the first (left to right) x coordinate where y is maximum, so you iterate and change only when you find a greater than
value.
The largest of maximum should get the last (left to right) x coordinate where y is maximum, so you iterate and change when greater than or equals to
.
This is maybe easier to see in QtFuzzyLite, just make sure to use Trapezoid terms instead of Triangle terms.
Does this answer your question?
Cheers.
from pyfuzzylite.
Oh, I see what you mean, Chris!
Yes, it is actually a bit more efficient to do the same but in reverse
The iteration would be instead:
x = maximum - (i + 0.5) * dx
from pyfuzzylite.
Oh yes, that's a very subtle change to do Ge rather than Gt, didn't notice that! Makes sense.
I'm in the final stages of my "fuzzyverylite" extension after getting a bit more time to have another look. It uses the Python library to parse the FLL, and then spits out C++ code to perform the calculations. I've managed to replicate one of our models in only 23KB of binary so far. I'll send it your way when I'm done with it for academic interest!
Heads up, I noticed in my last push over Christmas that pyfuzzylite couldn't load one of our FLLs successfully. I'll make another bug report if the same still happens.
from pyfuzzylite.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyfuzzylite.