Skip Menu |

This queue is for tickets about the AI-FuzzyInference CPAN distribution.

Report information
The Basics
Id: 86615
Status: new
Priority: 0/
Queue: AI-FuzzyInference

Owner: Nobody in particular
Requestors: jurgen.muck [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: Error in max/min? Error in clipping?
Date: Mon, 01 Jul 2013 23:05:50 +0200
To: bug-AI-FuzzyInference [...]
From: Jürgen Mück <jurgen.muck [...]>
[Reprint of an email from Febr 27th 2013 to Ala Qumsieh ( which has not been responded up to now]


thank you very much for your AI::FuzzyInference. I found it the best Fuzzy tool on cpan and studied your code.
(Nevertheless I had to implement my own one to fit my special needs (AI::FuzzyEngine) ).

When analyzing your code I found two issues in AI::FuzzyInference::Set I'm not sure whether they are a bug or I'm thinking wrong:

max (or min):

What happens if the curves of $set1 and $set2 cross?
Say (with max):
$set1: [ 0 => 1, # $x0, $y0
         1 => 0] # $x1, $y1
$set2: [ 0 => 0,
         1 => 1]

The maximum should be
max: [0   => 1,
      0.5 => 0.5,  # The curves are crossing
      1   => 1]

but in your functions max() and min() I didn't find a place which creates new points ($x coordinates).


Clipping is the same as saying

$clipped_set = min( $limit, $set ),

so all crossings between the (horizontal) $limit value and segments of the membership function should create a new $x and $y.

These are my thoughts. Maybe I oversaw some conversion steps of your membership functions only. I hope so, but I did not find any tests to prove it.



This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to