home Forums # Technical Support Technical Support

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6144
    Unknown
    Member

    Hi Juan,

    I bought and use your “Qtfuzzylite” to design my research it helps me a lot, if you have some knowledge about how it works with Genetic Algorithm please let me know the steps how to use/include genetic algorithm with your jfuzzylite library. and finally can you suggest me the performance evaluation tools and techniques to measure the system designed using your library? Here under i have attached the code fragment which display only the diffuzifed value, but i need you to add the code fragment to display the class or term this output value represents in front of the value.

    public static void main(String[] args){
    FloodLevelPrediction instance = new FloodLevelPrediction();
    Engine engine = instance.getEngine();

    for (int j = 0; j < 12; j++) {
    double rw = engine.getInputVariable(“RW”).getMinimum() + j * (engine.getInputVariable(“RW”).range() / 5);
    for (int i = 0; i < 12; ++i) {
    double gr = engine.getInputVariable(“GW”).getMinimum() + i * (engine.getInputVariable(“GW”).range() / 5);

    engine.getInputVariable(“RW”).setValue(rw);
    engine.getInputVariable(“GW”).setValue(gr);

    engine.process();
    double output = engine.getOutputVariable(“LT”).getValue();
    System.out.println(“RW=” + rw + “, GW” + gr + “->LT=” + output);

    }
    }
    }
    }

    When I run the program I get the output in number formats (Like ,LT=1.15, where LT is the output variable and 1.15 is the diffuzified value ),but i need also to display the Output Variable terms(in my case the output variable has three fuzzy terms (Normal,Warning and Emergency)) associated with the diffuzified output value. like (LT =1.15 ,Status Normal).
    ####################
    Current System Outputs
    RW=4.44, GW4.368->LT=2.15
    RW=4.44, GW6.336->LT=5.800730000000002# how to remove this large numbers after decimal point, i need approximate it to two decimal points

    My Desire Output
    RW=4.44, GW4.368->LT=2.15, Status= Normal
    RW=4.44, GW6.336->LT=5.80, Status= Warning

    Thanks in advance and I appreciate your cooperativeness.

    #6146

    Hi,

    thank you for your post and please excuse me for the late response.

    You can use Op.str(engine.getOutputVariable(“LT”).getValue()), where Op.java can be found in com.fuzzylite package

    Cheers.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.