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

People
Owner: Nobody in particular
Requestors: jurgen.muck [...] yahoo.de
Cc:
AdminCc:

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 [...] rt.cpan.org
From: Jürgen Mück <jurgen.muck [...] yahoo.de>
[Reprint of an email from Febr 27th 2013 to Ala Qumsieh (aqumsieh@cpan.org) which has not been responded up to now]

Ala,

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).

clip

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.

Regards

Jurgen
jmueck@cpan.org