Giter VIP home page Giter VIP logo

Comments (3)

jcrada avatar jcrada commented on June 22, 2024

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.

jcrada avatar jcrada commented on June 22, 2024

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.

CJxD avatar CJxD commented on June 22, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.