d909b / covews Goto Github PK
View Code? Open in Web Editor NEWThe COVID-19 Early Warning System (CovEWS) is a real-time early warning system for assessing individual COVID-19 related mortality risk.
License: MIT License
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
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
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.