Closed Yannahhh closed 2 years ago
Hi, thanks for bringing this to our attention. Can you provide more details on the code used to produce this result?
Thanks for your reply, should I provide my data also?
features = X.columns X = X.values rulefit = RuleFitClassifier(random_state=2022, tree_size=3, exp_rand_tree_size=False) rulefit.fit(X, y, feature_names=features) preds = rulefit.predict(X) accuracy = round(metrics.accuracy_score(y, preds), 2) rules = rulefit.get_rules() rules = rules[rules.coef != 0].sort_values("coef", ascending=False)
No need to provide the data — this is caused by a bug in the process of checking for duplicate rules (https://github.com/csinva/imodels/blob/master/imodels/util/extract.py#L97-L107). We will have it fixed shortly!
Was fixed in #87
Hello~
When I use the RulefitClassifier, it will return two exactly same rules but with different coef, whether the inherent structures didn't aggregate the rules? I have tried to use the Rulefit directly, and it seems that it doesn't have the similar problem~
The following image is part of my result