Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
license: mit
|
| 4 |
+
library_name: thrml
|
| 5 |
+
tags:
|
| 6 |
+
- mortality-prediction
|
| 7 |
+
- actuarial-science
|
| 8 |
+
- probabilistic-modeling
|
| 9 |
+
- thermal-computing
|
| 10 |
+
- energy-based-models
|
| 11 |
+
- life-expectancy
|
| 12 |
+
- death-probability
|
| 13 |
+
- uncertainty-quantification
|
| 14 |
+
pipeline_tag: tabular-classification
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# Thermal-Enhanced Morbid AI Model v0.1.1
|
| 18 |
+
|
| 19 |
+
## Model Description
|
| 20 |
+
|
| 21 |
+
Initial THRML integration with basic probabilistic mortality modeling capabilities. Includes uncertainty quantification and demographic factor interactions.
|
| 22 |
+
|
| 23 |
+
This model integrates THRML (Thermodynamic HypergRaphical Model Library) with Morbid AI's mortality prediction capabilities, providing probabilistic predictions with uncertainty quantification.
|
| 24 |
+
|
| 25 |
+
## Model Architecture
|
| 26 |
+
|
| 27 |
+
**Type**: thermal_energy_based_model
|
| 28 |
+
**Framework**: THRML + JAX
|
| 29 |
+
**Version**: 0.1.1
|
| 30 |
+
|
| 31 |
+
### Thermal Features
|
| 32 |
+
|
| 33 |
+
- Probabilistic graphical models for mortality factors
|
| 34 |
+
- Block Gibbs sampling with demographic blocking
|
| 35 |
+
- Energy-based life expectancy prediction
|
| 36 |
+
- Confidence intervals for all predictions
|
| 37 |
+
- Risk factor analysis and contribution scoring
|
| 38 |
+
|
| 39 |
+
## Performance Metrics
|
| 40 |
+
|
| 41 |
+
- **baseline_accuracy**: 0.8500
|
| 42 |
+
- **uncertainty_coverage**: 0.9500
|
| 43 |
+
- **demographic_factors**: 4.0000
|
| 44 |
+
- **sampling_efficiency**: 0.9200
|
| 45 |
+
|
| 46 |
+
## Usage
|
| 47 |
+
|
| 48 |
+
```python
|
| 49 |
+
from thermal.models.life_expectancy import LifeExpectancyEBM
|
| 50 |
+
from thermal.graph.mortality_graph import MortalityRecord
|
| 51 |
+
|
| 52 |
+
# Load mortality data
|
| 53 |
+
mortality_data = [...] # List of MortalityRecord objects
|
| 54 |
+
|
| 55 |
+
# Initialize thermal model
|
| 56 |
+
model = LifeExpectancyEBM(mortality_data)
|
| 57 |
+
|
| 58 |
+
# Make prediction with uncertainty quantification
|
| 59 |
+
prediction = model.predict_life_expectancy(
|
| 60 |
+
age=45,
|
| 61 |
+
country="USA",
|
| 62 |
+
sex=1, # 1=male, 2=female, 3=both
|
| 63 |
+
n_samples=1000,
|
| 64 |
+
confidence_level=0.95
|
| 65 |
+
)
|
| 66 |
+
|
| 67 |
+
print(f"Life Expectancy: {prediction.mean_life_expectancy:.1f} years")
|
| 68 |
+
print(f"95% CI: {prediction.confidence_interval}")
|
| 69 |
+
print(f"Uncertainty: {prediction.uncertainty:.2f}")
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
## Model Configuration
|
| 73 |
+
|
| 74 |
+
### THRML Parameters
|
| 75 |
+
|
| 76 |
+
**sampling**:
|
| 77 |
+
- default_samples: 1000
|
| 78 |
+
- burn_in: 200
|
| 79 |
+
- thinning: 2
|
| 80 |
+
- blocking_strategy: demographic
|
| 81 |
+
**model**:
|
| 82 |
+
- energy_based: True
|
| 83 |
+
- uncertainty_quantification: True
|
| 84 |
+
- demographic_interactions: True
|
| 85 |
+
**performance**:
|
| 86 |
+
- gpu_acceleration: True
|
| 87 |
+
- jax_backend: True
|
| 88 |
+
- memory_efficient: True
|
| 89 |
+
|
| 90 |
+
### Sampling Configuration
|
| 91 |
+
|
| 92 |
+
- **Block Gibbs Sampling**: Two-color and demographic blocking strategies
|
| 93 |
+
- **Default Samples**: 1000 MCMC samples
|
| 94 |
+
- **Burn-in**: 200 steps
|
| 95 |
+
- **Thinning**: Every 2nd sample
|
| 96 |
+
|
| 97 |
+
## Training Data
|
| 98 |
+
|
| 99 |
+
The model is trained on mortality data including:
|
| 100 |
+
- **Countries**: Global mortality statistics from major countries
|
| 101 |
+
- **Age Range**: 0-100+ years
|
| 102 |
+
- **Time Period**: 2010-2025
|
| 103 |
+
- **Demographic Factors**: Age, sex, country, year
|
| 104 |
+
|
| 105 |
+
## Limitations
|
| 106 |
+
|
| 107 |
+
- Model performance depends on availability of demographic-specific training data
|
| 108 |
+
- Uncertainty estimates are calibrated on historical data and may not capture unprecedented events
|
| 109 |
+
- Requires THRML and JAX dependencies for optimal performance
|
| 110 |
+
|
| 111 |
+
## Version History
|
| 112 |
+
|
| 113 |
+
### v0.1.1 - 2025-10-29
|
| 114 |
+
|
| 115 |
+
- Initial THRML integration framework
|
| 116 |
+
- MortalityGraphBuilder for demographic interactions
|
| 117 |
+
- LifeExpectancyEBM with uncertainty quantification
|
| 118 |
+
- Block Gibbs sampling implementation
|
| 119 |
+
- Basic API integration structure
|
| 120 |
+
|
| 121 |
+
## Citation
|
| 122 |
+
|
| 123 |
+
```
|
| 124 |
+
@software{thermal_morbid_ai_0_1_1,
|
| 125 |
+
title={Thermal-Enhanced Morbid AI Model},
|
| 126 |
+
version={0.1.1},
|
| 127 |
+
year={2025},
|
| 128 |
+
url={https://huggingface.co/MorbidCorp/thermal-mortality-model}
|
| 129 |
+
}
|
| 130 |
+
```
|
| 131 |
+
|
| 132 |
+
## License
|
| 133 |
+
|
| 134 |
+
MIT License - see LICENSE file for details.
|
| 135 |
+
|
| 136 |
+
## Contact
|
| 137 |
+
|
| 138 |
+
For questions about this model, please open an issue in the [Morbid AI repository](https://github.com/AlphaTONCapital/morbid-ai).
|