Package fuzzy4j.flc.defuzzify

Examples of fuzzy4j.flc.defuzzify.Centroid


                .when().var(room).is(cold).then().var(effort).is(high)
                .when().var(room).is(ok).then().var(effort).is(medi)
                .when().var(room).is(hot).then().var(effort).is(low)
                .activationFunction(AlgebraicProduct.INSTANCE)
                .accumulationFunction(AlgebraicSum.INSTANCE)
                .defuzzifier(new Centroid())
                .create();

        InputInstance instance = new InputInstance().is(room, 60);

        System.out.println("fuzzy = " + impl.applyFuzzy(instance));
View Full Code Here


        FLC impl = ControllerBuilder.newBuilder()
                .when().var(service).is(poor).or().var(food).is(rancid).then().var(tip).is(cheap)
                .when().var(service).is(good).then().var(tip).is(average)
                .when().var(service).is(excellent).then().var(tip).is(generous)
                .defuzzifier(new Centroid())
                .create();

        Map<Variable, Double> map=new HashMap<Variable, Double>();
        map.put(service, (double) 9);
        map.put(food, (double) 3);
View Full Code Here

        FLC impl = ControllerBuilder.newBuilder()
                .when().var(service).is(poor).and().var(food).is(rancid).then().var(tip).is(cheap)
                .activationFunction(AlgebraicProduct.INSTANCE)
                .accumulationFunction(AlgebraicSum.INSTANCE)
                .defuzzifier(new Centroid())
                .create();

        Map<Variable, Double> map=new HashMap<Variable, Double>();
        map.put(service, (double) 0);
        map.put(food, (double) 0);
View Full Code Here

        Variable paracetamol = output("paracetamol", none, moderate);

        FLC impl = ControllerBuilder.newBuilder()
                .when().var(temp).is(not(high)).then().var(paracetamol).is(none)
                .when().var(temp).is(high).then().var(paracetamol).is(moderate)
                .defuzzifier(new Centroid())
                .create();

        InputInstance instance = new InputInstance().is(temp, 37.0);

        System.out.println("normal.fuzzy = " + impl.applyFuzzy(instance));
View Full Code Here

TOP

Related Classes of fuzzy4j.flc.defuzzify.Centroid

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.