Skip to content

Cleanup imports, remove reg param from Pf2#18

Closed
nbedanova wants to merge 2 commits intomainfrom
Adding-mouse-immune-dictionary-ANOVA
Closed

Cleanup imports, remove reg param from Pf2#18
nbedanova wants to merge 2 commits intomainfrom
Adding-mouse-immune-dictionary-ANOVA

Conversation

@nbedanova
Copy link
Contributor

There are quite a few imports I do not use in the imports file that I deleted. Unsure if we want to keep them. Also, there are cells labeled as doublets in the mouse cytokine data so removing that when importing. Also removing regularization parameter variable in the pf2 function.

@nbedanova nbedanova requested a review from Copilot July 1, 2025 00:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR cleans up unused imports and adjusts function parameters, including removing the regularization parameter from the pf2 function while adding a deviance transformation option.

  • Removed unused imports and replaced csr_matrix with csr_array in pf2rnaseq/imports.py.
  • Introduced a new function (prepare_dataset_deviance) for deviance transformation and updated the import_Heiser function to support it.
  • Removed the regParam parameter in pf2 within pf2rnaseq/factorization.py.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pf2rnaseq/imports.py Removed unused imports; added prepare_dataset_deviance and updated import_Heiser to optionally apply deviance transformation.
pf2rnaseq/factorization.py Updated pf2 function by removing the regularization parameter from its signature and call.
Comments suppressed due to low confidence (2)

pf2rnaseq/imports.py:142

  • In import_Heiser, prepare_dataset is applied unconditionally after the deviance branch, which may result in double processing when deviance is true. Consider returning data immediately after prepare_dataset_deviance to avoid reapplying normalization.
    return prepare_dataset(data, "sample_id", geneThreshold=0.1)

pf2rnaseq/factorization.py:39

  • The removal of the regParam parameter from the pf2 function changes its API. Confirm that parafac2_nd and any downstream processing do not rely on L2 regularization, or update the documentation to reflect this change.
    tolerance=1e-9,

@nbedanova nbedanova closed this Jul 1, 2025
@nbedanova nbedanova deleted the Adding-mouse-immune-dictionary-ANOVA branch July 1, 2025 01:04
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.

1 participant