Skip to main content

计量经济学模型共形推断工具包 | Conformal Inference Toolkit for Econometric Models

Project description

Econformal

计量经济学模型共形推断工具包 | Conformal Inference Toolkit for Econometric Models

PyPI version License: MIT

📖 简介 | Introduction

Econformal 是一个将共形推断(Conformal Inference)与计量经济学模型相结合的 Python 工具包。它提供了不确定性量化功能,为计量经济学预测提供统计保证。

Econformal is a Python package that combines conformal inference with econometric models, providing uncertainty quantification with statistical guarantees for econometric predictions.

✨ 主要功能 | Features

  • 共形预测方法:实现 Split Conformal、Full Conformal 等方法
  • 计量经济学模型支持:支持 DID(双重差分)、Synthetic Control(合成控制)等经典计量模型
  • 不确定性量化:为预测结果提供有效的置信区间
  • 易于使用:简洁的 API 设计,快速上手
  • 可扩展性强:支持自定义模型和预测方法

🚀 安装 | Installation

从 PyPI 安装

pip install econformal

从源码安装

git clone https://github.com/FORRYWU/econformal.git
cd econformal
pip install .

开发环境安装

pip install -e ".[dev]"

📖 快速开始 | Quick Start

from econformal import Econformal

# 初始化模型
model = Econformal()

# 加载数据
# your data loading code here

# 拟合并预测
# model.fit()
# predictions = model.predict()

# 获取共形预测区间
# conformal_interval = model.conformal_predict()

📚 文档 | Documentation

详细文档请参考:Documentation

核心模块

  • conformal_methods: 共形推断方法

    • SplitConformal: Split Conformal 预测
    • FullConformal: Full Conformal 预测
  • econometrics_methods: 计量经济学方法

    • DID: 双重差分模型
    • SyntheticControl: 合成控制模型
  • tools: 工具函数

    • check: 数据检查
    • generate_data: 数据生成
    • plot: 可视化
    • model_registration: 模型注册

📝 示例 | Examples

更多示例请参考 example.py 文件。

🤝 贡献 | Contributing

欢迎贡献代码、报告问题或提出建议!

  1. Fork 本仓库
  2. 创建特性分支 (git checkout -b feature/AmazingFeature)
  3. 提交更改 (git commit -m 'Add some AmazingFeature')
  4. 推送到分支 (git push origin feature/AmazingFeature)
  5. 开启 Pull Request

📄 许可证 | License

本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。

📧 联系方式 | Contact

🙏 致谢 | Acknowledgments

感谢所有为这个项目做出贡献的人!


注意: 本项目仍在开发中,如有问题请通过 GitHub Issues 反馈。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

econformal-0.3.0.tar.gz (357.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

econformal-0.3.0-py3-none-any.whl (73.9 kB view details)

Uploaded Python 3

File details

Details for the file econformal-0.3.0.tar.gz.

File metadata

  • Download URL: econformal-0.3.0.tar.gz
  • Upload date:
  • Size: 357.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for econformal-0.3.0.tar.gz
Algorithm Hash digest
SHA256 862c80e14624b644f1565300464c0a9fbfdc7bf239591f62545d6a287da9e356
MD5 4557e31033a22164757d6ddaf24db8ed
BLAKE2b-256 feb4420b597169f736f37818703214ebf1cf120ec1b181e59172f3be80d58b9d

See more details on using hashes here.

File details

Details for the file econformal-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: econformal-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 73.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for econformal-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e52802c1b39693dc7fd5d41c0733f08aba6f0d7cfceecd9fc14c420eca65be74
MD5 fcc2608c9070f890b7938b01e93ad4fe
BLAKE2b-256 99e494f1aaac3b6ac0d75ade39623561d9314dba20586b580a46b5c9c0e17be2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page