flatironinstitute / inferelator

Task-based gene regulatory network inference using single-cell or bulk gene expression data conditioned on a prior network.
BSD 2-Clause "Simplified" License
47 stars 12 forks source link

Inquiry regarding the Settings of Hyper-parameters #33

Closed sap01 closed 3 years ago

sap01 commented 3 years ago

Hello Bonneau Lab members,

I am a member of the Roy Lab at UW-Madison. At our lab, we are trying to utilize the multi-task workflow of AMuSR. In that regard, there is a small doubt. How can we define the values of the hyper-parameters (such as the regularization penalties) in the input file?

Regards, Saptarshi

asistradition commented 3 years ago

Sorry for the delay.

This option was buried in some code refactoring I hadn't gotten around to finishing. It's now available in v0.5.2 (which is on pypi).

You can set the regression penalties at runtime as follows:

from inferelator import inferelator_workflow
import numpy as np

workflow = inferelator_workflow(workflow="amusr", regression="amusr")
workflow.set_regression_parameters(lambda_Bs=np.arange(10), lambda_Ss=np.arange(10))

Please let me know if there are any problems.

sap01 commented 3 years ago

Thank you very much for the clarification!

Seems like there shouldn't be any problems. If any, I'll reach out to you.