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

[New] Prediction of ODE parameters with indicators #477

Closed
lisphilar opened this issue Dec 31, 2020 · 8 comments · Fixed by #1154
Closed

[New] Prediction of ODE parameters with indicators #477

lisphilar opened this issue Dec 31, 2020 · 8 comments · Fixed by #1154
Labels
enhancement New feature or request

Comments

@lisphilar
Copy link
Owner

Summary of this new feature

At the current version, we perform scenario analysis, directly changing ODE parameter values of the future phases. However, it is difficult to estimate the impact of changing policy measures on ODE parameter values.

New method to calculate ODE parameter values with user-defined OxCGRT indicators will be useful.

(Optional) Solution

With #280, short-term prediction of ODE parameter values using OxCGRT indicators was included. The next step is that we add a feature to update OxCGRT dataset with user-defined values.

In addition, it is necessary to improve interpretability of prediction (Elastic Net regression) of ODE parameter values using Scenario.fit_predict().

@lisphilar
Copy link
Owner Author

To achieve this, a method of Scenario will be necessary to registers future values of extra datasets.

@lisphilar
Copy link
Owner Author

In analysis.DataHandler class internally,

  • save subsets for the selected country/province with a dataframe, not instances of data cleaning class. (related to [New] backup/restore Scenario object #741)
  • add a method to to register future values of extra dataset.

@lisphilar lisphilar added this to the Release v2.21.0 milestone May 24, 2021
@lisphilar lisphilar removed this from the Release v2.21.0 milestone Jun 9, 2021
@lisphilar
Copy link
Owner Author

future_regressor functionality of AutoTS package can be used.
https://winedarksea.github.io/AutoTS/build/html/source/tutorial.html#simulation-forecasting-1

@lisphilar
Copy link
Owner Author

lisphilar commented Aug 19, 2022

Class for feature engineering, feature selection, extending (add new records on future dates) and easy visualization will be required.
Named MLEngineer as instance.

@lisphilar
Copy link
Owner Author

The new class also Includes forecasting with/without regression.

@lisphilar lisphilar changed the title [New] Scenario analysis with OxCGRT indicators [New] Prediction of ODE parameters with indicators Sep 4, 2022
@lisphilar lisphilar added this to the Release v2.26.0 milestone Sep 4, 2022
@lisphilar
Copy link
Owner Author

Interface could be as follows.

import covsirphy as cs
snr = cs.ODEScenario.auto_build(geo="Japan", model=cs.SIRFModel)
# Prediction of ODE parameters WITHOUT indocators
snr.build_with_template(name="Predicted", template="Baseline")
snr.predict(days=30, name="Predicted", verbose=1)
# Prediction of ODE parameters WITH indocators
data_eng = cs.DataEngineer()
data_eng.download().clean().transform()
subset_df, *_ = data_eng.subset(geo="Japan")
X_all = subset_df.drop(["Population", "Susceptible", "Confirmed", "Infected", "Fatal", "Recovered"], axis=1)
ml = cs.MLEngineer(verbose=1)
pca_model = ml.pca(X=X_all, n_components=0.95)
X_pca = pca_model["PC"].copy()
X_pred = ml.forecast(Y=X_pca, days=30, X=None)
snr.build_with_template(name="Predicted_with_X", template="Baseline")
snr.predict(days=30, name="Predicted_with_X", verbose=1, X=X_pred)
# Compare scenarios
snr.append()
snr.describe()

@lisphilar lisphilar mentioned this issue Sep 4, 2022
@lisphilar
Copy link
Owner Author

For ducumentation, new notebook will be added to example.

@lisphilar
Copy link
Owner Author

With #1157,

@lisphilar lisphilar reopened this Sep 4, 2022
lisphilar added a commit that referenced this issue Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant