Weekly Post #3 - Determining the membership degree

This week saw the start of Sprint 0 - Spike work, research into the actual algorithms and getting the demo code up and running. This week has been somewhat slower than the previous, due to a roadblock mid-week:

Got Congealing Demo up and running

Read through and try to understand more of 'Fuzzy Entropy: a brief survey' 1

Spike work on image manipulation

Spike work on memberships within MATLAB


Congealing Demo

This took some playing around with the functions, figuring out which one linked to which, and trying to run almost all of them before discovering that 'testCongeal' was my friend.

You can see my blog post on this here.


Spike work on Images

As a newbie to MATLAB's image processing tools I thought I should spend some time getting to grips with greyscale, histograms of distributions of pixel intensities, and binary images. See some out my outputs below.

Image to greyscale and binary

Distribution of pixel intensities


Work on memberships

Memberships is a new concept to me. Neil spoke to me on Monday about how 2 out of the 3 Fuzzy entropy algorithms indeed need this membership, and I should ideally have 3 (or 5 if ambitious) groups spanning the 0-255 grey-level range (for clarity see picture below).
Membership drawing First of all, MATLAB needs another Toolbox to deal with Fuzzy Logic - easily named 'Fuzzy Logic Toolbox'. I'm currently running a months free trial, in the hope I won''t need to spend the extra £16.

So where am I up to figuring this out in MATLAB? Read on!

Broken plot Not 100% sure what has happened to this plot. It could be that it was missing a 'hold on' call, which ensures the line you've just plotted is not overwritten by the next line to be plotted.

\nThis is a static variable passed into the evalmf function (in this case x=80). As you can see this works fine with 2 trapmf graphs, however when a third is introduced, the y value is not computed (as seen in screenshot below).

This screenshot not only shows issues when introducing a third trapmf graph, but the red marker is actually a variable called 'intensityValue' from the pixel 80,230.

This shows just how easy it will be to pass in dynamic values as opposed to static (like the previous example).

I have now pinpointed my problem area. While there are nice examples like this, it only plots 1 membership trapezium, I am needing 3 overlapping membership groups. And as such the 'mfParams' it requires, is not a simple passing in of the param of 1 trapezium. This afternoon and part of the weekend will be spent tinkering to see if indeed the red line is finally where it is supposed to be!


Next week:

  • Create new branch for first Fuzzy Entropy implementation on MNIST data
  • Implement membership function into Congealing code
  • Look into whether to request 'On measures of Fuzziness' 2 from the library as it is unavailable online
  • Start work on the first implementation of a Fuzzy Entropy algorithm

  1. S. Al-Sharhan, F. Karray, W. Gueaieb, and O. Basir, 'Fuzzy entropy: a brief survey', in The 10th IEEE International Conference on Fuzzy Systems, 2001, 2001, vol. 3, pp. 1135-1139. ↩

  2. W. Sander, 'On measures of fuzziness,â' Fuzzy Sets and Systems - FSS, vol. 29, no. 1, pp. 49-55, 1989. ↩