Skip to content

MAINT turn rank deficiency exception to warning#139

Merged
BorisMuzellec merged 2 commits intomainfrom
deficient_rank_warning
Jun 12, 2023
Merged

MAINT turn rank deficiency exception to warning#139
BorisMuzellec merged 2 commits intomainfrom
deficient_rank_warning

Conversation

@BorisMuzellec
Copy link
Copy Markdown
Collaborator

Reference Issue or PRs

Fixes #136

What does your PR implement? Be specific.

Throw a UserWarning instead of a ValueError when a DeseqDataSet is initialized with a rank-deficient design matrix.
This allows users to run design-free VST without providing a full rank design (as described in #136).

@BorisMuzellec BorisMuzellec requested a review from a user June 8, 2023 14:31
Copy link
Copy Markdown

@ghost ghost left a comment

Choose a reason for hiding this comment

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

@BorisMuzellec LGTM except for a minor comment

Comment on lines 1045 to -1047
"The design matrix is not full rank, so the model cannot be "
"fitted. Please remove the design variables that are linear "
"combinations of others."
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This text is adapted to a valueError but not necessarily a warning. What do you think about toning down the message?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for your review! I've updated the warning.

@BorisMuzellec BorisMuzellec merged commit e36e002 into main Jun 12, 2023
@BorisMuzellec BorisMuzellec deleted the deficient_rank_warning branch June 12, 2023 08:27
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

Successfully merging this pull request may close these issues.

[BUG] Design matrix check prevents use of VST without design matrix

1 participant