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.2.0.tar.gz (356.0 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.2.0-py3-none-any.whl (73.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for econformal-0.2.0.tar.gz
Algorithm Hash digest
SHA256 207e4a470add2518e34f073a4e459eae2a2b26c2e4267e1dc5e0fb2db4c7d7b2
MD5 c221a15b2b12f6987adcd11c885aee79
BLAKE2b-256 ddf554a3bc3fb7061fd3de7d2939a7ebff6649d5646c0aa419e535427d1b0f2f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: econformal-0.2.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3457107ac8e79baaf6e780f03c3c7af71a2abb2f6f80ddfb8dd11640cc8ee06e
MD5 728c164969becec4819b3953cfd1fdb7
BLAKE2b-256 b5afa5ae4463ea03340c260141591fc138f9d176c43b2253344c3845a04ffbbd

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