home › Forums › # Technical Support › Technical Support
- This topic has 1 reply, 2 voices, and was last updated 5 years, 5 months ago by
Juan Rada-Vilela (admin).
-
AuthorPosts
-
April 14, 2018 at 17:10 #6144
Unknown
MemberHi 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 pointsMy Desire Output
RW=4.44, GW4.368->LT=2.15, Status= Normal
RW=4.44, GW6.336->LT=5.80, Status= WarningThanks in advance and I appreciate your cooperativeness.
April 23, 2018 at 09:00 #6146Juan Rada-Vilela (admin)
KeymasterHi,
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 incom.fuzzylite
packageCheers.
-
AuthorPosts
- You must be logged in to reply to this topic.