Ejemplo n.º 1
0
        public HeuristicAnalyzer()
        {
            var fuzzySetJmpFirst       = new FuzzySets(new FuzzySet("infected", 0.95), new FuzzySet("uninfected", 0.05));
            var fuzzySetManyZeros      = new FuzzySets(new FuzzySet("infected", 0.9), new FuzzySet("uninfected", 0.1));
            var fuzzySetDangerousWords = new FuzzySets(new FuzzySet("infected", 0.7), new FuzzySet("uninfected", 0.5));

            var fuzzySetNotJmpFirst       = new FuzzySets(new FuzzySet("infected", 0.1), new FuzzySet("uninfected", 0.6));
            var fuzzySetNotManyZeros      = new FuzzySets(new FuzzySet("infected", 0.15), new FuzzySet("uninfected", 0.7));
            var fuzzySetNotDangerousWords = new FuzzySets(new FuzzySet("infected", 0.2), new FuzzySet("uninfected", 0.4));

            Productions = new List <Production>
            {
                new Production(new Condition("x1", true, HeuristicFunctions.CheckJmpFirstBytes), new Conclusion("y", fuzzySetJmpFirst, 0.95), 1),
                new Production(new Condition("x2", false, HeuristicFunctions.CheckNotJmpFirstBytes), new Conclusion("y", fuzzySetNotJmpFirst, 0.5), 1),

                new Production(new Condition("x3", true, HeuristicFunctions.CheckManyZeros), new Conclusion("y", fuzzySetManyZeros, 0.85), 1),
                new Production(new Condition("x4", false, HeuristicFunctions.CheckNotManyZeros), new Conclusion("y", fuzzySetNotManyZeros, 0.6), 1),

                new Production(new Condition("x5", true, HeuristicFunctions.CheckDangerousWords), new Conclusion("y", fuzzySetDangerousWords, 0.7), 1),
                new Production(new Condition("x6", false, HeuristicFunctions.CheckNotDangerousWords), new Conclusion("y", fuzzySetNotDangerousWords, 0.4), 1)
            };
        }
Ejemplo n.º 2
0
 public Conclusion(string variable, FuzzySets fuzzySets, double alpha)
 {
     Variable  = variable;
     FuzzySets = fuzzySets;
     Alpha     = alpha;
 }