[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-mckinsey--causalnex":3,"tool-mckinsey--causalnex":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":79,"owner_email":79,"owner_twitter":80,"owner_website":81,"owner_url":82,"languages":83,"stars":99,"forks":100,"last_commit_at":101,"license":102,"difficulty_score":103,"env_os":104,"env_gpu":104,"env_ram":104,"env_deps":105,"category_tags":107,"github_topics":108,"view_count":10,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":116,"updated_at":117,"faqs":118,"releases":134},1210,"mckinsey\u002Fcausalnex","causalnex","A Python library that helps data scientists to infer causation rather than observing correlation.","causalnex 是一个专为数据科学家设计的Python开源库，专注于帮助用户从数据中推断真实因果关系，而非仅依赖表面相关性。它通过贝叶斯网络构建因果模型，让领域专家能轻松补充专业知识到模型中，从而精准评估“如果改变某个因素会怎样”的干预效果，例如预测营销策略调整对销售额的影响。传统方法需要组合3-4个工具完成从结构学习到效果分析的流程，而causalnex整合了全流程，大幅简化了因果推理和反事实分析。它特别适合数据科学家、研究人员及业务分析师使用，尤其在需要可靠决策支持的场景（如医疗、金融或产品优化）。技术亮点在于其直观的贝叶斯网络框架，支持快速融入领域知识，并直接输出干预影响评估，让分析更聚焦于因果而非偶然相关性，避免了传统机器学习的常见误区。","![CausalNex](https:\u002F\u002Fraw.githubusercontent.com\u002Fquantumblacklabs\u002Fcausalnex\u002Fmaster\u002Fdocs\u002Fsource\u002Fcausalnex_banner.png)\n\n-----------------\n\n| Theme | Status                                                                                                                                                                                                                 |\n|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Latest Release | [![PyPI version](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fcausalnex.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fcausalnex\u002F)                                                                                                                         |\n| Python Version | [![Python Version](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.8%20%7C%203.9%20%7C%203.10-blue.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fcausalnex\u002F)                                                            |\n| `master` Branch Build | [![CircleCI](https:\u002F\u002Fcircleci.com\u002Fgh\u002Fquantumblacklabs\u002Fcausalnex\u002Ftree\u002Fmaster.svg?style=shield&circle-token=92ab70f03f3183655473dad16be641959cd31b83)](https:\u002F\u002Fcircleci.com\u002Fgh\u002Fquantumblacklabs\u002Fcausalnex\u002Ftree\u002Fmaster)   |\n| `develop` Branch Build | [![CircleCI](https:\u002F\u002Fcircleci.com\u002Fgh\u002Fquantumblacklabs\u002Fcausalnex\u002Ftree\u002Fdevelop.svg?style=shield&circle-token=92ab70f03f3183655473dad16be641959cd31b83)](https:\u002F\u002Fcircleci.com\u002Fgh\u002Fquantumblacklabs\u002Fcausalnex\u002Ftree\u002Fdevelop) |\n| Documentation Build | [![Documentation](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmckinsey_causalnex_readme_13d664e1afd7.png)](https:\u002F\u002Fcausalnex.readthedocs.io\u002F)                                                                                                |\n| License | [![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-Apache%202.0-blue.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FApache-2.0)                                                                                                   |\n| Code Style | [![Code Style: Black](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcode%20style-black-black.svg)](https:\u002F\u002Fgithub.com\u002Fambv\u002Fblack)                                                                                                       |\n\n\n## What is CausalNex?\n\n> \"A toolkit for causal reasoning with Bayesian Networks.\"\n\nCausalNex aims to become one of the leading libraries for causal reasoning and \"what-if\" analysis using Bayesian Networks. It helps to simplify the steps:\n - To learn causal structures,\n - To allow domain experts to augment the relationships,\n - To estimate the effects of potential interventions using data.\n\n## Why CausalNex?\n\nCausalNex is built on our collective experience to leverage Bayesian Networks to identify causal relationships in data so that we can develop the right interventions from analytics. We developed CausalNex because:\n\n- We believe **leveraging Bayesian Networks** is more intuitive to describe causality compared to traditional machine learning methodology that are built on pattern recognition and correlation analysis.\n- Causal relationships are more accurate if we can easily **encode or augment domain expertise** in the graph model.\n- We can then use the graph model to **assess the impact** from changes to underlying features, i.e. counterfactual analysis, and **identify the right intervention**.\n\nIn our experience, a data scientist generally has to use at least 3-4 different open-source libraries before arriving at the final step of finding the right intervention.  CausalNex aims to simplify this end-to-end process for causality and counterfactual analysis.\n\n## What are the main features of CausalNex?\n\nThe main features of this library are:\n\n- Use state-of-the-art structure learning methods to understand conditional dependencies between variables\n- Allow domain knowledge to augment model relationship\n- Build predictive models based on structural relationships\n- Fit probability distribution of the Bayesian Networks\n- Evaluate model quality with standard statistical checks\n- Simplify how causality is understood in Bayesian Networks through visualisation\n- Analyse the impact of interventions using Do-calculus\n\n## How do I install CausalNex?\n\nCausalNex is a Python package. To install it, simply run:\n\n```bash\npip install causalnex\n```\n\nUse `all` for a full installation of dependencies:\n```bash\npip install \"causalnex[all]\"\n```\n\nSee more detailed installation instructions, including how to setup Python virtual environments, in our [installation guide](https:\u002F\u002Fcausalnex.readthedocs.io\u002Fen\u002Flatest\u002F02_getting_started\u002F02_install.html) and get started with our [tutorial](https:\u002F\u002Fcausalnex.readthedocs.io\u002Fen\u002Flatest\u002F03_tutorial\u002F01_first_tutorial.html).\n\n## How do I use CausalNex?\n\nYou can find the documentation for the latest stable release [here](https:\u002F\u002Fcausalnex.readthedocs.io\u002Fen\u002Flatest\u002F). It explains:\n\n- An end-to-end [tutorial on how to use CausalNex](https:\u002F\u002Fcausalnex.readthedocs.io\u002Fen\u002Flatest\u002F03_tutorial\u002F01_first_tutorial.html)\n- The [main concepts and methods](https:\u002F\u002Fcausalnex.readthedocs.io\u002Fen\u002Flatest\u002F04_user_guide\u002F04_user_guide.html) in using Bayesian Networks for Causal Inference\n\n> Note: You can find the notebook and markdown files used to build the docs in [`docs\u002Fsource`](docs\u002Fsource).\n\n## Can I contribute?\n\nYes! We'd love you to join us and help us build CausalNex. Check out our [contributing](CONTRIBUTING.md) documentation.\n\n## How do I upgrade CausalNex?\n\nWe use [SemVer](http:\u002F\u002Fsemver.org\u002F) for versioning. The best way to upgrade safely is to check our [release notes](RELEASE.md) for any notable breaking changes.\n\n## How do I cite CausalNex?\n\nYou may click \"Cite this repository\" under the \"About\" section of this repository to get the citation information in APA and BibTeX formats.\n\n## What licence do you use?\n\nSee our [LICENSE](LICENSE.md) for more detail.\n\n## We're hiring!\n\nDo you want to be part of the team that builds CausalNex and [other great products](https:\u002F\u002Fwww.mckinsey.com\u002Fcapabilities\u002Fquantumblack\u002Flabs) at QuantumBlack? If so, you're in luck! QuantumBlack is currently hiring Machine Learning Engineers who love using data to drive their decisions. Take a look at [our open positions](https:\u002F\u002Fwww.mckinsey.com\u002Fcapabilities\u002Fquantumblack\u002Fcareers-and-community) and see if you're a fit.\n","![CausalNex](https:\u002F\u002Fraw.githubusercontent.com\u002Fquantumblacklabs\u002Fcausalnex\u002Fmaster\u002Fdocs\u002Fsource\u002Fcausalnex_banner.png)\n\n-----------------\n\n| 主题 | 状态                                                                                                                                                                                                                 |\n|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 最新版本 | [![PyPI version](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fcausalnex.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fcausalnex\u002F)                                                                                                                         |\n| Python 版本 | [![Python Version](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.8%20%7C%203.9%20%7C%203.10-blue.svg)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fcausalnex\u002F)                                                            |\n| `master` 分支构建 | [![CircleCI](https:\u002F\u002Fcircleci.com\u002Fgh\u002Fquantumblacklabs\u002Fcausalnex\u002Ftree\u002Fmaster.svg?style=shield&circle-token=92ab70f03f3183655473dad16be641959cd31b83)](https:\u002F\u002Fcircleci.com\u002Fgh\u002Fquantumblacklabs\u002Fcausalnex\u002Ftree\u002Fmaster)   |\n| `develop` 分支构建 | [![CircleCI](https:\u002F\u002Fcircleci.com\u002Fgh\u002Fquantumblacklabs\u002Fcausalnex\u002Ftree\u002Fdevelop.svg?style=shield&circle-token=92ab70f03f3183655473dad16be641959cd31b83)](https:\u002F\u002Fcircleci.com\u002Fgh\u002Fquantumblacklabs\u002Fcausalnex\u002Ftree\u002Fdevelop) |\n| 文档构建 | [![Documentation](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmckinsey_causalnex_readme_13d664e1afd7.png)](https:\u002F\u002Fcausalnex.readthedocs.io\u002F)                                                                                                |\n| 许可证 | [![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-Apache%202.0-blue.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FApache-2.0)                                                                                                   |\n| 代码风格 | [![Code Style: Black](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcode%20style-black-black.svg)](https:\u002F\u002Fgithub.com\u002Fambv\u002Fblack)                                                                                                       |\n\n\n## CausalNex 是什么？\n\n> “一个用于贝叶斯网络因果推理的工具包。”\n\nCausalNex 的目标是成为使用贝叶斯网络进行因果推理和“假设分析”的领先库之一。它有助于简化以下步骤：\n - 学习因果结构，\n - 允许领域专家补充关系信息，\n - 利用数据估计潜在干预措施的效果。\n\n## 为什么选择 CausalNex？\n\nCausalNex 基于我们团队的经验，利用贝叶斯网络来识别数据中的因果关系，从而通过数据分析制定正确的干预措施。我们开发 CausalNex 的原因在于：\n\n- 我们认为，**利用贝叶斯网络**描述因果关系比基于模式识别和相关性分析的传统机器学习方法更加直观。\n- 如果能够轻松地在图模型中**编码或补充领域知识**，因果关系的准确性会更高。\n- 随后，我们可以使用该图模型来**评估底层特征变化的影响**，即反事实分析，并**确定合适的干预措施**。\n\n根据我们的经验，一名数据科学家通常需要使用至少 3–4 种不同的开源库，才能最终找到正确的干预方案。CausalNex 旨在简化这一端到端的因果关系和反事实分析流程。\n\n## CausalNex 的主要功能有哪些？\n\n该库的主要功能包括：\n\n- 使用最先进的结构学习方法来理解变量之间的条件依赖关系；\n- 允许结合领域知识来补充模型关系；\n- 基于结构关系构建预测模型；\n- 拟合贝叶斯网络的概率分布；\n- 通过标准统计检验评估模型质量；\n- 通过可视化简化对贝叶斯网络中因果关系的理解；\n- 使用 Do 微积分分析干预措施的影响。\n\n## 如何安装 CausalNex？\n\nCausalNex 是一个 Python 包。要安装它，只需运行：\n\n```bash\npip install causalnex\n```\n\n如果需要完整安装所有依赖项，请使用 `all`：\n```bash\npip install \"causalnex[all]\"\n```\n\n更多详细的安装说明，包括如何设置 Python 虚拟环境，请参阅我们的[安装指南](https:\u002F\u002Fcausalnex.readthedocs.io\u002Fen\u002Flatest\u002F02_getting_started\u002F02_install.html)，并从我们的[教程](https:\u002F\u002Fcausalnex.readthedocs.io\u002Fen\u002Flatest\u002F03_tutorial\u002F01_first_tutorial.html)开始使用。\n\n## 如何使用 CausalNex？\n\n您可以在此处找到最新稳定版的文档：[这里](https:\u002F\u002Fcausalnex.readthedocs.io\u002Fen\u002Flatest\u002F)。其中介绍了：\n\n- 一个关于如何使用 CausalNex 的端到端[教程](https:\u002F\u002Fcausalnex.readthedocs.io\u002Fen\u002Flatest\u002F03_tutorial\u002F01_first_tutorial.html)；\n- 在使用贝叶斯网络进行因果推断时的[主要概念和方法](https:\u002F\u002Fcausalnex.readthedocs.io\u002Fen\u002Flatest\u002F04_user_guide\u002F04_user_guide.html)。\n\n> 注意：用于构建文档的笔记本和 Markdown 文件可在 [`docs\u002Fsource`](docs\u002Fsource) 中找到。\n\n## 我可以贡献代码吗？\n\n当然可以！我们非常欢迎您的加入，一起共建 CausalNex。请查看我们的[贡献指南](CONTRIBUTING.md)。\n\n## 如何升级 CausalNex？\n\n我们采用 [SemVer](http:\u002F\u002Fsemver.org\u002F) 进行版本管理。安全升级的最佳方式是查看我们的[发布说明](RELEASE.md)，以了解是否有显著的破坏性变更。\n\n## 如何引用 CausalNex？\n\n您可以在本仓库“关于”部分的“引用此仓库”选项中，获取 APA 和 BibTeX 格式的引用信息。\n\n## 你们使用什么许可证？\n\n详情请参阅我们的[LICENSE](LICENSE.md)。\n\n## 我们正在招聘！\n\n您是否希望加入 QuantumBlack 团队，共同打造 CausalNex 以及[其他优秀产品](https:\u002F\u002Fwww.mckinsey.com\u002Fcapabilities\u002Fquantumblack\u002Flabs)？如果是的话，那真是太幸运了！QuantumBlack 目前正在招聘热爱利用数据驱动决策的机器学习工程师。请查看我们的[开放职位](https:\u002F\u002Fwww.mckinsey.com\u002Fcapabilities\u002Fquantumblack\u002Fcareers-and-community)，看看您是否适合。","# CausalNex 快速上手指南\n\n## 环境准备\n- **系统要求**：Python 3.8、3.9 或 3.10\n- **前置依赖**：已安装 Python 和 pip（推荐使用虚拟环境）\n\n## 安装步骤\n```bash\npip install causalnex\n```\n如需安装所有依赖（包括可选包），使用：\n```bash\npip install \"causalnex[all]\"\n```\n\n## 基本使用\n以下是最简示例，展示如何构建基础贝叶斯网络并可视化：\n\n```python\nimport causalnex\nfrom causalnex.structure import StructureModel\nfrom causalnex.structure import LearningAlgorithm\n\n# 创建结构模型\nsm = StructureModel()\n\n# 添加节点和因果关系\nsm.add_nodes_from([\"A\", \"B\", \"C\"])\nsm.add_edge(\"A\", \"B\")\nsm.add_edge(\"B\", \"C\")\n\n# 可视化因果图\nsm.plot()\n```\n\n> **说明**：实际应用中需用真实数据训练结构（参考官方教程：[快速入门教程](https:\u002F\u002Fcausalnex.readthedocs.io\u002Fen\u002Flatest\u002F03_tutorial\u002F01_first_tutorial.html)）。此示例仅演示基础模型构建流程。","电商公司数据科学家团队正分析\"限时折扣\"促销活动对月度销售额的影响，试图确定活动是否真正驱动销售增长，而非仅与季节性波动相关。\n\n### 没有 causalnex 时\n- 仅用皮尔逊相关系数判断促销与销售额关系，忽略用户年龄、节假日等混杂变量，误判促销贡献率达30%，实际仅12%。\n- 需手动拼接scikit-learn、pgmpy等5个库构建因果模型，开发周期长达10天，且领域专家无法直接参与模型调整。\n- 无法量化\"若取消促销\"的业务影响，决策依赖经验推测，导致资源错配（如过度投入无效活动）。\n- 模型输出难以向业务团队解释，多次被质疑\"相关不等于因果\"。\n\n### 使用 causalnex 后\n- 通过causalnex的结构学习自动识别因果图，精准排除混杂变量干扰，确认促销真实贡献率仅12%。\n- 直接在贝叶斯网络中嵌入业务规则（如\"促销仅影响点击率，不直接提升转化\"），30分钟完成专家知识融合。\n- 一键模拟\"取消促销\"场景，量化显示销售额将下降15%，为预算优化提供明确依据。\n- 整合因果推理全流程，开发周期压缩至2天，结果附带可视化因果路径，业务团队快速采纳。\n\ncausalnex将模糊的相关性分析转化为可落地的因果决策引擎，让数据驱动业务干预真正精准有效。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmckinsey_causalnex_425d50ff.png","mckinsey","Open Source by McKinsey","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fmckinsey_c177a1b4.png","To help create positive, enduring change in the world.",null,"McKinsey","https:\u002F\u002Fmckinsey.com","https:\u002F\u002Fgithub.com\u002Fmckinsey",[84,88,92,96],{"name":85,"color":86,"percentage":87},"Python","#3572A5",99.2,{"name":89,"color":90,"percentage":91},"Shell","#89e051",0.6,{"name":93,"color":94,"percentage":95},"Dockerfile","#384d54",0.1,{"name":97,"color":98,"percentage":95},"Makefile","#427819",2452,285,"2026-04-05T06:13:42","NOASSERTION",1,"未说明",{"notes":104,"python":106,"dependencies":104},"3.8+",[13,51,54],[109,110,111,112,113,114,115,67],"causal-inference","causal-models","causal-networks","bayesian-networks","bayesian-inference","machine-learning","data-science","2026-03-27T02:49:30.150509","2026-04-06T08:52:37.518986",[119,124,129],{"id":120,"question_zh":121,"answer_zh":122,"source_url":123},5513,"模型中出现负权重边是什么原因？如何解决？","负权重边表示变量间的负相关关系。建议调整超参数如 'W-Threshold'、'beta'（针对 from_pandas_lasso），或进行数据预处理（如缩放、离散化、编码），直到图结构符合领域知识。","https:\u002F\u002Fgithub.com\u002Fmckinsey\u002Fcausalnex\u002Fissues\u002F59",{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},5514,"如何获取 Dynotears 学习得到的邻接矩阵？","StructureModel 对象继承自 networkx.DiGraph，可使用 networkx 的 adjacency_matrix 方法获取，例如：`adj_matrix = nx.adjacency_matrix(g_learnt).todense()`。或通过迭代 `g_learnt.nodes()` 或 `g_learnt.edges()` 自定义提取。","https:\u002F\u002Fgithub.com\u002Fmckinsey\u002Fcausalnex\u002Fissues\u002F74",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},5515,"为什么文档使用 Boston housing 数据集？这是否存在问题？","Boston housing 数据集包含种族相关变量（如 B = 1000(Bk - 0.63)^2），用于预测房价，存在种族歧视问题。已替换为 Breast cancer 数据集（sklearn），并在所有笔记本中添加公平性评估，以避免数据偏见。","https:\u002F\u002Fgithub.com\u002Fmckinsey\u002Fcausalnex\u002Fissues\u002F91",[135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230],{"id":136,"version":137,"summary_zh":138,"released_at":139},114710,"0.12.1","Release 0.12.1","2023-06-22T13:11:20",{"id":141,"version":142,"summary_zh":143,"released_at":144},114711,"0.12.0","Release 0.12.0","2023-04-20T14:10:47",{"id":146,"version":147,"summary_zh":148,"released_at":149},114712,"0.11.2","Release 0.11.2","2023-04-03T03:11:52",{"id":151,"version":152,"summary_zh":153,"released_at":154},114713,"0.11.1","Release 0.11.1","2023-01-17T15:45:36",{"id":156,"version":157,"summary_zh":158,"released_at":159},114714,"v0.11.1","Change log:\r\n * Add python 3.9, 3.10 support\r\n * Unlock Scipy restrictions\r\n * Fix bug: infinite loop on lv inference engine\r\n * Fix DAGLayer moving out of gpu during optimization step of Pytorch learning\r\n * Fix CPD comparison of floating point - rounding issue\r\n * Fix set_cpd for parentless nodes that are not MultiIndex\r\n * Add Docker files for development on a dockerized environment","2022-11-16T15:09:31",{"id":161,"version":162,"summary_zh":163,"released_at":164},114715,"v0.11.0","Changelog:\r\n* Add expectation-maximisation (EM) algorithm to learn with latent variables\r\n* Add a new tutorial on adding latent variable as well as identifying its candidate location\r\n* Allow users to provide self-defined CPD, as per #18 and #99\r\n* Generalise the utility function to get Markov blanket and incorporate it within `StructureModel` (cf. #136)\r\n* Add a link to `PyGraphviz` installation guide under the installation prerequisites\r\n* Add GPU support to Pytorch implementation, as requested in #56 and #114 (some issues remain)\r\n* Add an example for structure model exporting into first causalnex tutorial, as per #124 and #129\r\n* Fix infinite loop when querying `InferenceEngine` after a do-intervention that splits\r\n  the graph into two or more subgraphs, as per #45 and #100\r\n* Fix decision tree and mdlp discretisations bug when input data is shuffled\r\n* Fix broken URLs in FAQ documentation, as per #113 and #125\r\n* Fix integer index type checking for timeseries data, as per #74 and #86\r\n* Fix bug where inputs to the DAGRegressor\u002FClassifier yielded different predictions between float and int dtypes, as per #140","2021-11-11T14:58:40",{"id":166,"version":167,"summary_zh":168,"released_at":169},114716,"0.11.0","Release 0.11.0","2021-11-11T15:15:24",{"id":171,"version":172,"summary_zh":173,"released_at":174},114717,"v0.10.0","Functionality:\r\n* Add `BayesianNetworkClassifier` an sklearn compatible class for fitting and predicting probabilities in a BN.\r\n* Add supervised discretisation strategies using Decision Tree and MDLP algorithms.\r\n* Support receiving a list of inputs for `InferenceEngine` with a multiprocessing option\r\n* Add utility function to extract Markov blanket from a Bayesian Network\r\n\r\nMinor fixes and housekeeping:\r\n* Fix estimator issues with sklearn (\"unofficial python 3.9 support\", doesn't work with `discretiser` option)\r\n* Fixes cyclical import of `causalnex.plots`, as per #106.\r\n* Added manifest files to ensure requirements and licenses are packaged\r\n* Minor bumps in dependency versions, remove prettytable as dependency","2021-05-11T18:26:26",{"id":176,"version":177,"summary_zh":178,"released_at":179},114718,"0.9.2","No functional changes.\r\n\r\nDocs:\r\n* Remove Boston housing dataset from the \"sklearn tutorial\", see #91 for more information.\r\n\r\nDevelopment experience:\r\n* Update pylint version to 2.7\r\n* Improve speed and non-stochasticity of tests","2021-03-11T19:03:37",{"id":181,"version":182,"summary_zh":183,"released_at":184},114719,"0.9.1","* Fixed bug where the sklearn tutorial documentation wasn't rendering.\r\n* Weaken pandas requirements to >=1.0, \u003C2.0 (was ~=1.1).","2021-01-06T22:07:04",{"id":186,"version":187,"summary_zh":188,"released_at":189},114720,"0.9.0","**Core changes**\r\n* Add Python 3.8 support and drop 3.5.\r\n* Add pandas >=1.0 support, among other dependencies\r\n* PyTorch is now a full requirement\r\n* Extension of distribution types for structure learning\r\n* Bugfixes","2020-12-07T15:21:14",{"id":191,"version":192,"summary_zh":193,"released_at":194},114721,"0.8.1","Complete sklearn wrapper suite, `DAGClassifier` (0.8.1) and `DAGRegressor` (from 0.8.0)","2020-09-18T15:50:21",{"id":196,"version":197,"summary_zh":198,"released_at":199},114722,"v0.8.0","Release 0.8.0","2020-09-10T13:05:34",{"id":201,"version":202,"summary_zh":203,"released_at":204},114723,"0.7.0","Release 0.7.0","2020-05-28T14:06:56",{"id":206,"version":207,"summary_zh":208,"released_at":209},114724,"0.6.0","Release 0.6.0","2020-04-27T10:08:37",{"id":211,"version":212,"summary_zh":213,"released_at":214},114725,"0.5.0","Release 0.5.0","2020-03-25T10:09:29",{"id":216,"version":217,"summary_zh":218,"released_at":219},114726,"0.4.3","Release 0.4.3","2020-02-05T17:08:51",{"id":221,"version":222,"summary_zh":223,"released_at":224},114727,"0.4.2","Release 0.4.2","2020-01-28T14:39:10",{"id":226,"version":227,"summary_zh":228,"released_at":229},114728,"0.4.1","Release 0.4.1","2020-01-28T14:18:57",{"id":231,"version":232,"summary_zh":233,"released_at":234},114729,"0.4.0","Release 0.4.0","2020-01-28T12:22:17"]