Closed akdenizince closed 1 year ago
Hi @akdenizince , thank you for your contribution.
Could you share a minimal working example of the probor function and weighted Mamdani fuzzy system?
If probor is used only as aggregation function, it can be simply passed as a pointer with the argument aggregation_function
, when calling the Mamdani inference method.
Regarding the weights, I do not exactly understand how they can work without modifying the parser, so an example would be helpful.
Thanks!
Hi @sspola, I could not add the .py extension file, so I am sending the code as a text file with the excel contains required paramters. This is the smallest module of our model, but it includes both weight and probor applications. Since we have this model both in the languages of Python and MATLAB, we are able to compare the results and they are the same even for the modules with many parameters. For probor case, I also did not like the way that I used for calling it, but -if you wish to add it- I am sure that you can integrate or call it in a more appropriate way. By the way, I might be confusing weights with the firing strengths when I write the comment or email, but I am sure that you will understand what I am trying to imply when you check the example code.
Best wishes, Akdeniz.
Hi @akdenizince
I rearranged things to be consistent with the rest of the code :)
Now you can import the probor
function from simpful, and pass it as a pointer via the aggregation_function
argument.
E.g.: FS.Mamdani_inference(["HIVulInd"], aggregation_function=probor)
I also restructured the handling of the weights to make it consistent to what was already implemented for Sugeno inference.
Could you try this out and check that everything is okay (compared to the Matlab version)? Thank you very much for your contribution!
Hi @sspola, I have checked the final results of main modules and final distributions from both of the models, and I am also sending them to you so that you can check. The results are the same and I did not undergo any problems. Btw, I really liked the rearrangements that you made :) Best wishes, Akdeniz.
Hi @akdenizince ,
good to hear! Thanks to you for your valuable additions :)
I will push a new version of Simpful as soon as possible.
Greetings, My name is Akdeniz. I sent an email about the some additional codes that I have added to increase useability last week and you wanted me to create a pull request. This is the first time I open a pull request, so if there is an issue please let me know.
Thank you for your time and consideration.