Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return local model #3

Closed
oathaha opened this issue Mar 26, 2021 · 3 comments
Closed

return local model #3

oathaha opened this issue Mar 26, 2021 · 3 comments

Comments

@oathaha
Copy link
Collaborator

oathaha commented Mar 26, 2021

I think it would be beneficial for user if local model of explain() function is included in returned dictionary.

The current code looks like this

rule_obj = {'synthetic_data': synthetic_instances,
                    'synthetic_predictions': synthetic_predictions,
                    'X_explain': X_explain,
                    'y_explain': y_explain,
                    'indep': self.indep,
                    'dep': self.dep,
                    'top_k_positive_rules': top_k_positive_rules,
                    'top_k_negative_rules': top_k_negative_rules}

but I think it should looks like this

rule_obj = {'synthetic_data': synthetic_instances,
                    'synthetic_predictions': synthetic_predictions,
                    'X_explain': X_explain,
                    'y_explain': y_explain,
                    'indep': self.indep,
                    'dep': self.dep,
                    'local_model': local_rulefit_model,
                    'top_k_positive_rules': top_k_positive_rules,
                    'top_k_negative_rules': top_k_negative_rules}
@MichaelFu1998-create
Copy link
Collaborator

Hi, it sounds great, could you provide the potential use case as an example so that I can understand your idea more clearly.

@oathaha
Copy link
Collaborator Author

oathaha commented Mar 26, 2021

Here is my idea
local_model = rule_obj ['local_model'] # get local model from rule_obj

other code for experiment

In my opinion, some researchers would like to save local model for later use (like for evaluation). So it will be useful for them if they can obtain local model.

@MichaelFu1998-create
Copy link
Collaborator

Agree. Will update the code to implement this. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants