I want to write a small code in c# using Fuzzy Logic framework where user will give input number between 0 to 10 and that numbers needs to be classified as Low, Moderate and High. Low is 0 to 3, Moderate is 3 to 7 and High is between 6 to 10. Using triangular membership function. Any guess how to do it I read some tutorials on Fuzzy Framework but couldn't get my problem fit in those. Following is code I wrote,
class Program
{
static void Main(string[] args)
{
ContinuousDimension score = new ContinuousDimension("score", "score of word", "unit", 0, 10);
//Definition of basic fuzzy sets with which we will work
// input sets:
ContinuousSet low = new RightQuadraticSet(score, "Low Score", 0, 3, 4);
ContinuousSet high = new LeftQuadraticSet(score, "High Score", 6, 7, 10);
ContinuousSet mod = new BellSet(score, "Moderate Score", 5, 1, 2);
....
}
How should I proceed further now. I have assigned manually some score to opinion words on scale of 0 to 10 and I want to classify intensity of this opinion words as low, moderate or high using triangular function.