Implement Dynamic CDI
OmerRonen opened this issue · comments
Implementing a Dynamic CDIs class based on FIGS
.
TODOs:
- Implement a sklearn compatible class named
D-FIGS
in a new fileimodels/tree/dynamic_figs.py
- Write a test using the PECARN IAI dataset
More details:
- The
D-FIGS
class should inherit fromFIGS
class, and take an additional dictionary at initialization, corresponding to the features phases.
When applying thefit
orpredict
methods, the class should verify that the matrix$X$ is compatible with the features tiers. For example phase 2 features can be available (not NA) only if all phase 1 features are available (we may refine this logic later). -
D-FIGS
should infer the phase from the matrix. - The tests should be written in a new file named
imodels/tests/dynamic_figs_test.py
, using pytest (see package documentation or you can use the figs test as reference) - Before you start writing code, please write down a short description detailing how you are going to implement the dynamic fitting algorithm. Specifically: How does the model infer the current phase of the patient? How do you store the different models for different phases and ensure these are compatible with one another?
@JerryJia00 I opened a branch for you 136-implement-dynamic-cdi
please write you code there