Giter Site home page Giter Site logo

d909b / covews Goto Github PK

View Code? Open in Web Editor NEW
17.0 17.0 2.0 1.18 MB

The COVID-19 Early Warning System (CovEWS) is a real-time early warning system for assessing individual COVID-19 related mortality risk.

License: MIT License

Python 100.00%
covid-19 deep-learning research

covews's People

Contributors

d909b avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

covews's Issues

ImportError: cannot import name 'SemiParametricRegressionFittter' from 'lifelines.fitters'

I was trying to black box dry run the code to see what to expect, facing an issue regarding import function, can you tell me how to solve it.

Traceback (most recent call last):
File "/home/vishnu/try/covews/apps/main.py", line 399, in
app.run()
File "/home/vishnu/anaconda3/envs/kaggle/lib/python3.8/site-packages/covews/apps/base_application.py", line 141, in run
return self.run_single(evaluate_against=evaluate_against)
File "/home/vishnu/anaconda3/envs/kaggle/lib/python3.8/site-packages/covews/apps/base_application.py", line 156, in run_single
model, history = self.train_model(train_generator,
File "/home/vishnu/anaconda3/envs/kaggle/lib/python3.8/site-packages/covews/apps/util.py", line 87, in func_wrapper
return_value = func(*args, **kargs)
File "/home/vishnu/try/covews/apps/main.py", line 237, in train_model
best_model_path = self.get_best_model_path()
File "/home/vishnu/try/covews/apps/main.py", line 155, in get_best_model_path
model_class = self.get_model_type_for_method_name()
File "/home/vishnu/try/covews/apps/main.py", line 211, in get_model_type_for_method_name
mod = importlib.import_module(fully_qualified_name)
File "/home/vishnu/anaconda3/envs/kaggle/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/vishnu/anaconda3/envs/kaggle/lib/python3.8/site-packages/covews/models/baselines/time_varying_cox.py", line 24, in
from covews.models.nonlinear_cox.cox_time_varying_fitter import CoxTimeVaryingFitter
File "/home/vishnu/anaconda3/envs/kaggle/lib/python3.8/site-packages/covews/models/nonlinear_cox/cox_time_varying_fitter.py", line 57, in
from lifelines.fitters import SemiParametricRegressionFittter
ImportError: cannot import name 'SemiParametricRegressionFittter' from 'lifelines.fitters' (/home/vishnu/anaconda3/envs/kaggle/lib/python3.8/site-packages/lifelines/fitters/init.py)

Why baseline cumulative hazard for prediction?

I have noticed that TimeVaryingCox.predict and TimeVaryingCox.predict_at_time compute the predicted hazard score using the baseline cumulative hazard function:

c_0 = interpolate_at_times(self.model.baseline_cumulative_hazard_, times_to_evaluate_at).T # <<----
v = self.model.predict_partial_hazard(x)
y_pred = c_0*v.values

However, the hazard score at time t is defined as: h(t|x) = h_0(t) * exp{beta^T x}
Therefore, shouldn't we use the baseline hazard function h_0 instead?

Thank you in advance!

P.S. the functions mentioned above are in CovEWS\models\baselines

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.