Skip to content

Multivariate Joint Model

JulietteOrtholand requested to merge jo/multi into v2

What does the code in the MR do?

This MR introduces the joint multivariate model. It can be seen in the two following steps. First, enable the joint model to work with the Multivariatelogisticmodel with the Weibull distribution of the univariate model. Then the idea is to introduce a second Weibull distribution that considers the sources as covariates in the Cox model and branch it into the joint model. The univariate joint model did not disappear, but most of the functions moved to the joint model.

Where should the reviewer start?

The reviewer should start with the new observation model. A new distribution has been added, and the file containing Weibull obs_model has been updated. The new observation model has been added to the factory. A new model has been added, the joint model, and almost all the methods of the univariate_joint model have been moved to this new model, becoming a bit like the univariate_logistic model. I have updated the method in the state to init individual parameters from a data frame to handle sources.

I have started updating tests but it is still WIP.

Finally, abstract_multivariate, multivariate_parallele should not have changed, I guess the changes are linked to the fact that I used a work-in-progress branch.

How can the code be tested?

Done:

Model validation: I have tested the model to check if the parameters that enable the simulation could be found back: image I have issues with the zetas, the betas and the sources because the sign and the order of the sources are not fixed. Nevertheless, the following results are encouraging for betas and zetas: Capture_d_écran_2023-12-22_à_18.29.14

Functional tests: Tests for api_fit have been implemented. Personalisation mean and mode real have been implemented.

To do: Model validation: I still have the sources to check, I guess I will check the w_n that is not impacted by the ordering of the sources, but then there is the double estimation limit at least for fit. For personalisation, I will directly use the model that enables the simulation, thus I should not have any issues.

Functional tests: Tests in personalisation crash for scipy-minimize... Might be linked to the fact that I have simulated patients by hand and their progression might not be realistic... Still need to investigate. I also need to implement the other API tests and check that the model enable the user to give whatever combination of both ('surv_obs', 'long_obs'), ('long_obs', 'surv_obs').

What issues are linked to the MR?

None

Edited by JulietteOrtholand

Merge request reports