Good morning, I am generating rules with Jrip with the following code:
labor_data.train_test_split(70, Random(1))
jrip.build_classifier(labor_data)
rset = jrip.jwrapper.getRuleset()
for i in range(rset.size()):
r = rset.get(i)
print(str(r.toString(labor_data.class_attribute.jobject)))
As you can see, the data set is divided into train and test, I already checked and the rules it gives me are the same as the weka Explorer corresponding to "Out model" see red date in the following image, but with the problem which classifies them in reverse, that is, the LABEL attribute, which is the one I am classifying, has two possible values UP or Down, and the Explorer is giving me the rules => LABEL=UP, while in python it is giving me exactly the same rules, but at the end it appears => LABEL=Down, that is, just the opposite, how can I solve this?
Additionally, I have the problem that it is giving me only the rules corresponding to the "Output model" as I mentioned before, and I need it to give me the rules corresponding to the "Output models for training splits" see green date in the image, how can I configure via code, the image panel options, to obtain only the rules of the "Output models for training splits"? . Greetings.