Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add usage of `EMParams` Class `EMParams` is now used by the `ExpectationMaximizationModel`. * Remove use of `_read_pars()` from `_em_model.py` Since _read_pars() should be deleted in the future, _initialize_state_dict() does not rely on it anymore. * Implement abstact methods Add implementation of state_dict() and export_results_adata() and remove use of _write_pars() in ExpectationMaximizationModel.fit(). * Add type hints to `_initialize_state_dict` * Refactor `_initialize_state_dict` * Rename variables (`pars_names` to `parameters`, `pars` to `parameter_dict`). * Restructure code to reduce number of variables. * Update definition of parameters initialized with as nan. * Refine `ExpectationMaximizationModel` * Add metadata the attributes to `EMParams` * Add methods read/write `EMParams` from/to AnnData * Adapt the method `fit()` such that it uses the class `EMParams` * Include `_align_dynamics()` as a method in `ExpectationMaximizationModel` and adapt it to also use `EMParams` * Include `_flatten()` from `_em_model_core.py` * Modify export to AnnData After the change, parameters are not written if they contain only nan values. * Update `_em_model.py` Add argument `show_progress_bar` to `fit` method. * Update `tests/test_basic.py` --------- Co-authored-by: Philipp Weiler <[email protected]>
- Loading branch information