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.1.0.tar.gz (62.2 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.1.0-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for econformal-0.1.0.tar.gz
Algorithm Hash digest
SHA256 18d11654655ebec59fa4c3d0dd0954188a9b5ee23acdef3a2f1963ed1e021318
MD5 fbb1a09f3bd1b0437da7fbb939fba465
BLAKE2b-256 f74df037409cc0d00e11e8fd6371c515be2b5932c2658e00c6c480f6a9b7a000

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for econformal-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c3d86d1ea17e83a21efc350b5f548b1a4c055760aefa7aceeb8019ff60121c1
MD5 f4b20d5bb894b4b73112da5d36c81677
BLAKE2b-256 2cf99239750c0db78223bdd1c38e0120a1e818e4e0f00f3dc5805a14a7328e75

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