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

using fairness_check_regression() with an equation instead of model object #52

Open
aminadibi opened this issue Nov 14, 2023 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@aminadibi
Copy link

fairness_check_regression() requires a DALEX explainer as input. To create a DALEX explainer, one needs a model object. Imagine, I am getting a regression equation from a paper and I want to look into fairness of it with a dataset. I did not fit the regression myself, and thus don't have a model object. How can I create an explainer from an arbitrary R function that uses a formula (or whatever) to produce the predictions of the regression model?

Thanks

@jakwisn
Copy link
Member

jakwisn commented Nov 28, 2023

Hi, I think what you need is to make a custom DALEX explainer from the function. I found this piece of code in the DALEX documentation:

# simple function
aps_fun <- function(x) 58*x$surface
aps_fun_explainer <- explain(aps_fun, data = apartments, y = apartments$m2.price, label="sfun")
model_performance(aps_fun_explainer)

Could this approach work in your scenario?

@jakwisn jakwisn self-assigned this Nov 28, 2023
@jakwisn jakwisn added the question Further information is requested label Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants