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

not possible to change distribution threshold in DiffCombObj.select_rules() #31

Closed
vheger opened this issue Dec 9, 2021 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@vheger
Copy link
Collaborator

vheger commented Dec 9, 2021

Hi Mette,
Selina asked how the DiffCombObj.select_rules() can be adjusted to be more stringent (see loosolab/Datenanalyse-2021#4) . I had a look and it seems the user is able to adjust the pvalue theshold [y-axis]

def select_rules(self, contrast=None,
                                measure="cosine", 
                                measure_threshold=None,
                                pvalue_threshold=0.05,
                                plot = True, 
                               **kwargs) # goes into plot

But not the percentage used as distribution threshold [x-axis], although utils.get_threshold() provides this parameter:

def get_threshold(data, which="upper", percent=0.05, _n_max=10000, verbosity=0):

This seems a bit inconsistent to me. Is there a reason for preventing the user to change this? Or should we add this option to select_rules() ?

@vheger vheger added the question Further information is requested label Dec 9, 2021
msbentsen added a commit that referenced this issue Dec 9, 2021
@msbentsen
Copy link
Member

Hi, thank you for catching this @vheger and @selinaLa! It is indeed quite inconsistent, I agree. I added the option to do:
<CombObj>.select_significant_rules(x_threshold_percent=0.01, y_threshold_percent=0.01)
and
<DiffCombObj>.select_rules(measure_threshold_percent=0.01)

So that will make the automatic selection more strict (default is 0.05 for all thresholds). But I will also have a look at the select_rules for DiffCombObj again. The p-value calculation is not working out so well, so I might change this function in the future (but the output will still be a subset of the original object, so nothing should change in the following steps).

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