Skip to content

EnCluDL(1/4): add comments and docstring of the functions #156

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

Open
wants to merge 132 commits into
base: main
Choose a base branch
from

Conversation

lionelkusch
Copy link
Collaborator

I refactor the code of ensemble_clustered_inference and clustered_inference.
This pull request is dependent of the PR #127

Copy link
Collaborator

@bthirion bthirion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example on fMRI data does not render well, for some reason. Can you check that, so that we can merge this PR and proceed to further improvements ?

@lionelkusch
Copy link
Collaborator Author

The example on fMRI data does not render well, for some reason. Can you check that, so that we can merge this PR and proceed to further improvements ?

What do you mean that fMRI does not render well?
For me there are very similar to the actual ones.

@bthirion
Copy link
Collaborator

The EncluDL image is ugly with the white area. Something went wrong.

@lionelkusch
Copy link
Collaborator Author

I added an empirical threshold for filling the gap.

@lionelkusch lionelkusch added the API 1 Refactoring following API 1 label Apr 11, 2025
@lionelkusch
Copy link
Collaborator Author

@lionelkusch
Copy link
Collaborator Author

The white colour came from the modification of the aggregation function.
I realise that this aggregation is similar to that for the knockoff. I updated the aggregation method of EnCluDL based on the knockoff.
Can @bthirion or @AngelReyero validate my modification of the function ensemble_clustered_inference_pvalue (line 496 of ensemble_clustered_inference.py)?

Copy link
Collaborator

@bthirion bthirion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example renders well, thx !

X, y, ward, n_clusters, scaler_sampling=StandardScaler()
)
beta_hat, pval_cdl, _, one_minus_pval_cdl, _ = clustered_inference_pvalue(
X.shape[0], None, ward_, beta_hat, theta_hat, omega_diag
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll have to refactor this to a class (same logic as discussed for DCRT etc.)
Are you planing to do that in a forthcoming PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I plan to refactor all of this in classes in another PR.

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

Successfully merging this pull request may close these issues.

4 participants