Tabular Classification
Scikit-learn
English
hierarchical
healthcare
ehr
copd
clinical-risk
tabular
scikit-learn
clustering
unsupervised
Instructions to use stormid/copd-model-e with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use stormid/copd-model-e with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("stormid/copd-model-e", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
File size: 378 Bytes
53a6def | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | import numpy as np
def calc_ds_med(v):
"""
Calculate the median value of a subgroup by removing any float nulls and
converting from days to integers
--------
:param v: values in column
:return: median value
"""
day = np.timedelta64(1, 'D')
med_val = (v.dropna() / day).astype(int).median().astype(int)
med_val *= day
return med_val |