home Forums # Technical Support Is there support for the Singleton term? Reply To: Is there support for the Singleton term?


Hi Juan,

Thank you for the quick response. I’m sorry I didn’t respond before, I got caught up in work and school.

I don’t think that the Constant term is what I’m looking for, as the membership value is always a constant value irrespective of the value of x, i.e., μ(x)=c.

What I meant was a term that has a single value with membership value of 1.0, which is useful to deal with crisp values, such as mapping categorical values to numerical values that can be used in a fuzzy inference engine.

For instance, for a hypothetical SingletonTerm Java class with the constructor

public SingletonTerm(String name, double value)

and the method

public double membership(double x) { return x == this.value ? 1.0 : 0.0; }

we could represent categorical data like this:

SingletonTerm no = new SingletonTerm("No", 0.0)
SingletonTerm yes = new SingletonTerm("Yes", 1.0)
SingletonTerm unknown = new SingletonTerm("Unknown", 2.0)

For reference, this kind of term is called singletonShape in the Fuzzy Markup Language, and SingletonFuzzySet in FuzzyJ.

Thank you in advance.