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

plotting FeatureEffect object #181

Open
Lukpawlik opened this issue Sep 14, 2021 · 4 comments
Open

plotting FeatureEffect object #181

Lukpawlik opened this issue Sep 14, 2021 · 4 comments

Comments

@Lukpawlik
Copy link

Hi,
I want to plot only one column of FeatureEffect object (ALE plot). New iml seems to have this argument (ncols) but after installing from Github (iml version 0.10.1.9000) there is still no such possibility of plotting. How can I solve it?
Best,
Lukasz

@christophM
Copy link
Collaborator

Do you mean FeatureEffect or FeatureEffects? For FeatureEffects there should be an option ncol

@Lukpawlik
Copy link
Author

True, I mixed that up. I will try with FeatureEffects. Thanks

@Lukpawlik
Copy link
Author

Ok., now I can explain in better, I hope. I need only a left side of each ALE plot; only results for the positive class of the response variable under the impact of a given predictor. What I mean is that the two panels of ALE plot mirror each other and according to one reviewer the right panel is redundant. I'm trying to remove the right panel but so far have not found an appropriate solution. Thanks
image

@ljhburn
Copy link

ljhburn commented Sep 17, 2021

Hi, @Lukpawlik , for the two classes task,you can try to focus on one class,like:

x = test[which(names(test) != "dam")] #
model_1 = Predictor$new(ranger_learner, data = x, y = test$dam, type = "prob", class = "1") # focus on the class 1 dam 
model <- Predictor$new(ranger_learner, data = x, y = test$dam, type = "prob") # this will creat a mirror plot in Feature Effects,but would be useful when calling the FeatureImp.

# Feature Effects
effect_FE = FeatureEffects$new(predictor = model_1, method = "ale")  # you might also want to try other method like ”ice“ 
plot(effect_FE)

# FeatureImp
effect_FI = FeatureImp$new(model, loss = "ce")
effect_FI$plot(features = num_features)

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

3 participants