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

Old name of tool still present in inference.py #9

Open
kaushik-roy-physics opened this issue Aug 15, 2024 · 1 comment
Open

Old name of tool still present in inference.py #9

kaushik-roy-physics opened this issue Aug 15, 2024 · 1 comment

Comments

@kaushik-roy-physics
Copy link

Please notice the mistake in the last line of the attached code below. This is taken from the inference.py file in the ~/Chronocell/ directory. I think it needs to be changed to import_module("Chronocell.models."+model). Another place where it still contains the old name is in the test.py file in the same directory although it won't affect users at all.

Another small request would be to add comments in the .py files for the models and the inference.py specially for defining the variables which are quite different from those used in the paper. For eg. the parametric solutions of \lambda as defined in the paper have an \alpha_{s} which has dimensions 1/time. However, in the code for 'two_species_ss.py' and 'two_species_ss_tau.py', all dimensionless quantities are used and hence many terms have a scaling by the factor \beta. It would be really helpful to have consistency between the code and the manuscript.

Hope this helps.

Kaushik


class Trajectory:
    """
    Representation of a trajectory model probability distribution.
   
   
    Attributes
    ----------
    topo: 2D np.darray
    tau:    
    """

    def init(self, topo, tau, model="two_species_ss", restrictions={}, verbose=0):
        """
        set model and global parameters
        """
        self.topo=np.array(topo,dtype=int)
        self.prior_tau=np.array(tau,dtype=float)
        self.tau=np.array(tau,dtype=float)
        self.L=len(topo)
        self.n_states=len(set(topo.flatten()))
        self.K=len(tau)-1
        self.model_restrictions=restrictions
        self.model=model
        self.verbose = verbose
       
        ## import model specific methods from the provided file
        tempmod = import_module("RADOM.models."+model)

@meichenfang
Copy link
Collaborator

Thank you for catching that! I've updated the import. I'll also make sure to harmonize the parameters between the paper and the code.

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

No branches or pull requests

2 participants