[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-modAL-python--modAL":3,"tool-modAL-python--modAL":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 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[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":67,"owner_avatar_url":76,"owner_bio":77,"owner_company":78,"owner_location":78,"owner_email":78,"owner_twitter":78,"owner_website":78,"owner_url":79,"languages":80,"stars":89,"forks":90,"last_commit_at":91,"license":92,"difficulty_score":93,"env_os":94,"env_gpu":95,"env_ram":95,"env_deps":96,"category_tags":103,"github_topics":104,"view_count":23,"oss_zip_url":78,"oss_zip_packed_at":78,"status":16,"created_at":114,"updated_at":115,"faqs":116,"releases":150},3357,"modAL-python\u002FmodAL","modAL","A modular active learning framework for Python","modAL 是一个专为 Python 设计的模块化主动学习框架，旨在帮助开发者高效构建智能数据标注流程。在大数据时代，面对海量未标记数据，人工标注往往成本高昂且耗时费力。modAL 通过“主动学习”策略解决了这一痛点：它能自动分析数据，智能筛选出对模型提升最有价值的样本供人工标注，从而用最少的标注成本实现最佳的模型性能。\n\n这款工具特别适合机器学习工程师、数据科学家及算法研究人员使用。其核心亮点在于极高的灵活性与可扩展性：modAL 基于 scikit-learn 构建，允许用户无缝集成现有的分类器或回归模型（甚至支持 Keras），并轻松替换不确定性度量与查询策略。无论是快速搭建原型，还是研发自定义的新型主动学习算法，用户只需几行代码即可初始化工作流，也能自由替换内部组件以适应特定需求。如果你希望在减少人工干预的同时提升模型效率，modAL 将是一个强大而友好的技术伙伴。","\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FmodAL-python_modAL_readme_c7efdccfaf61.png\" alt=\"modAL\" style=\"width: 400px;\">\n\nModular Active Learning framework for Python3\n\n[![travis-ci-master](https:\u002F\u002Ftravis-ci.org\u002FmodAL-python\u002FmodAL.svg?branch=master)](https:\u002F\u002Ftravis-ci.org\u002FmodAL-python\u002FmodAL) [![codecov-master](https:\u002F\u002Fcodecov.io\u002Fgh\u002FmodAL-python\u002FmodAL\u002Fbranch\u002Fmaster\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002FmodAL-python\u002FmodAL) [![readthedocs](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FmodAL-python_modAL_readme_6bf48b3e9a6d.png)](http:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002F?badge=latest)\n\n## Page contents\n- [Introduction](#introduction)  \n- [Active learning from bird's-eye view](#active-learning)  \n- [modAL in action](#modAL-in-action)\n  - [From zero to one in a few lines of code](#initialization)  \n  - [Replacing parts quickly](#replacing-parts)  \n  - [Replacing parts with your own solutions](#replacing-parts-with-your-own-solutions)  \n  - [An example with active regression](#active-regression)\n  - [Additional examples](#additional-examples)  \n- [Installation](#installation)  \n- [Documentation](#documentation)  \n- [Citing](#citing)  \n- [About the developer](#about-the-developer)\n\n# Introduction\u003Ca name=\"introduction\">\u003C\u002Fa>\nmodAL is an active learning framework for Python3, designed with *modularity, flexibility* and *extensibility* in mind. Built on top of scikit-learn, it allows you to rapidly create active learning workflows with nearly complete freedom. What is more, you can easily replace parts with your custom built solutions, allowing you to design novel algorithms with ease.\n\n# Active learning from bird's-eye view\u003Ca name=\"active-learning\">\u003C\u002Fa>\nWith the recent explosion of available data, you have can have millions of unlabelled examples with a high cost to obtain labels. For instance, when trying to predict the sentiment of tweets, obtaining a training set can require immense manual labour. But worry not, active learning comes to the rescue! In general, AL is a framework allowing you to increase classification performance by intelligently querying you to label the most informative instances. To give an example, suppose that you have the following data and classifier with shaded regions signifying the classification probability.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FmodAL-python_modAL_readme_9db001304c27.png\" height=\"600px\" width=\"600px\"\u002F>\n\u003C\u002Fp>\n\nSuppose that you can query the label of an unlabelled instance, but it costs you a lot. Which one would you choose? By querying an instance in the uncertain region, surely you obtain more information than querying by random. Active learning gives you a set of tools to handle problems like this. In general, an active learning workflow looks like the following.\n\n\u003Cp align=\"center\">\n \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FmodAL-python_modAL_readme_f35cc829e922.png\"\u002F>\n\u003C\u002Fp>\n\nThe key components of any workflow are the **model** you choose, the **uncertainty** measure you use and the **query** strategy you apply to request labels. With modAL, instead of choosing from a small set of built-in components, you have the freedom to seamlessly integrate scikit-learn or Keras models into your algorithm and easily tailor your custom query strategies and uncertainty measures.\n\n# modAL in action\u003Ca name=\"modAL-in-action\">\u003C\u002Fa>\nLet's see what modAL can do for you!\n\n## From zero to one in a few lines of code\u003Ca name=\"initialization\">\u003C\u002Fa>\nActive learning with a scikit-learn classifier, for instance RandomForestClassifier, can be as simple as the following.\n```python\nfrom modAL.models import ActiveLearner\nfrom sklearn.ensemble import RandomForestClassifier\n\n# initializing the learner\nlearner = ActiveLearner(\n    estimator=RandomForestClassifier(),\n    X_training=X_training, y_training=y_training\n)\n\n# query for labels\nquery_idx, query_inst = learner.query(X_pool)\n\n# ...obtaining new labels from the Oracle...\n\n# supply label for queried instance\nlearner.teach(X_pool[query_idx], y_new)\n```\n\n## Replacing parts quickly\u003Ca name=\"replacing-parts\">\u003C\u002Fa>\nIf you would like to use different uncertainty measures and query strategies than the default uncertainty sampling, you can either replace them with several built-in strategies or you can design your own by following a few very simple design principles. For instance, replacing the default uncertainty measure to classification entropy looks the following.\n```python\nfrom modAL.models import ActiveLearner\nfrom modAL.uncertainty import entropy_sampling\nfrom sklearn.ensemble import RandomForestClassifier\n\nlearner = ActiveLearner(\n    estimator=RandomForestClassifier(),\n    query_strategy=entropy_sampling,\n    X_training=X_training, y_training=y_training\n)\n```\n\n## Replacing parts with your own solutions\u003Ca name=\"replacing-parts-with-your-own-solutions\">\u003C\u002Fa>\nmodAL was designed to make it easy for you to implement your own query strategy. For example, implementing and using a simple random sampling strategy is as easy as the following.\n```python\nimport numpy as np\n\ndef random_sampling(classifier, X_pool):\n    n_samples = len(X_pool)\n    query_idx = np.random.choice(range(n_samples))\n    return query_idx, X_pool[query_idx]\n\nlearner = ActiveLearner(\n    estimator=RandomForestClassifier(),\n    query_strategy=random_sampling,\n    X_training=X_training, y_training=y_training\n)\n```\nFor more details on how to implement your custom strategies, visit the page [Extending modAL](https:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Foverview\u002FExtending-modAL.html)!\n\n## An example with active regression\u003Ca name=\"active-regression\">\u003C\u002Fa>\nTo see modAL in *real* action, let's consider an active regression problem with Gaussian Processes! In this example, we shall try to learn the *noisy sine* function:\n```python\nimport numpy as np\n\nX = np.random.choice(np.linspace(0, 20, 10000), size=200, replace=False).reshape(-1, 1)\ny = np.sin(X) + np.random.normal(scale=0.3, size=X.shape)\n```\nFor active learning, we shall define a custom query strategy tailored to Gaussian processes. In a nutshell, a *query stategy* in modAL is a function taking (at least) two arguments (an estimator object and a pool of examples), outputting the index of the queried instance. In our case, the arguments are ```regressor``` and ```X```.\n```python\ndef GP_regression_std(regressor, X):\n    _, std = regressor.predict(X, return_std=True)\n    return np.argmax(std)\n```\nAfter setting up the query strategy and the data, the active learner can be initialized.\n```python\nfrom modAL.models import ActiveLearner\nfrom sklearn.gaussian_process import GaussianProcessRegressor\nfrom sklearn.gaussian_process.kernels import WhiteKernel, RBF\n\nn_initial = 5\ninitial_idx = np.random.choice(range(len(X)), size=n_initial, replace=False)\nX_training, y_training = X[initial_idx], y[initial_idx]\n\nkernel = RBF(length_scale=1.0, length_scale_bounds=(1e-2, 1e3)) \\\n         + WhiteKernel(noise_level=1, noise_level_bounds=(1e-10, 1e+1))\n\nregressor = ActiveLearner(\n    estimator=GaussianProcessRegressor(kernel=kernel),\n    query_strategy=GP_regression_std,\n    X_training=X_training.reshape(-1, 1), y_training=y_training.reshape(-1, 1)\n)\n```\nThe initial regressor is not very accurate.\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FmodAL-python_modAL_readme_74d0b374788a.png\">\n\u003C\u002Fp>\n\nThe blue band enveloping the regressor represents the standard deviation of the Gaussian process at the given point. Now we are ready to do active learning!\n```python\n# active learning\nn_queries = 10\nfor idx in range(n_queries):\n    query_idx, query_instance = regressor.query(X)\n    regressor.teach(X[query_idx].reshape(1, -1), y[query_idx].reshape(1, -1))\n```\nAfter a few queries, we can see that the prediction is much improved.\n\n\u003Cp align=\"center\">\n \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FmodAL-python_modAL_readme_8c8bba42411e.png\">\n\u003C\u002Fp>\n\n## Additional examples\u003Ca name=\"additional-examples\">\u003C\u002Fa>\nIncluding this, many examples are available:\n- [Pool-based sampling](https:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fexamples\u002Fpool-based_sampling.html)  \n- [Stream-based sampling](https:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fexamples\u002Fstream-based_sampling.html)  \n- [Active regression](https:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fexamples\u002Factive_regression.html)  \n- [Ensemble regression](https:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fexamples\u002Fensemble_regression.html)  \n- [Bayesian optimization](https:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fexamples\u002Fbayesian_optimization.html)  \n- [Query by committee](https:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fexamples\u002Fquery_by_committee.html)  \n- [Bootstrapping and bagging](https:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fexamples\u002Fbootstrapping_and_bagging.html)  \n- [Keras integration](https:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fexamples\u002FKeras_integration.html)\n\n# Installation\u003Ca name=\"installation\">\u003C\u002Fa>\nmodAL requires\n- Python >= 3.5\n- NumPy >= 1.13\n- SciPy >= 0.18\n- scikit-learn >= 0.18\n\nYou can install modAL directly with pip:  \n```\npip install modAL-python\n```\nAlternatively, you can install modAL directly from source:  \n```\npip install git+https:\u002F\u002Fgithub.com\u002FmodAL-python\u002FmodAL.git\n```\n\n# Documentation\u003Ca name=\"documentation\">\u003C\u002Fa>\nYou can find the documentation of modAL at [https:\u002F\u002FmodAL-python.github.io](https:\u002F\u002FmodAL-python.github.io), where several tutorials and working examples are available, along with a complete API reference. For running the examples, Matplotlib >= 2.0 is recommended.\n\n# Citing\u003Ca name=\"citing\">\u003C\u002Fa>\nIf you use modAL in your projects, you can cite it as\n```\n@article{modAL2018,\n    title={mod{AL}: {A} modular active learning framework for {P}ython},\n    author={Tivadar Danka and Peter Horvath},\n    url={https:\u002F\u002Fgithub.com\u002FmodAL-python\u002FmodAL},\n    note={available on arXiv at \\url{https:\u002F\u002Farxiv.org\u002Fabs\u002F1805.00979}}\n}\n```\n\n# About the developer\u003Ca name=\"about-the-developer\">\nmodAL is developed by me, [Tivadar Danka](https:\u002F\u002Fwww.tivadardanka.com) (aka [cosmic-cortex](https:\u002F\u002Fgithub.com\u002Fcosmic-cortex) in GitHub). I have a PhD in pure mathematics, but I fell in love with biology and machine learning right after I finished my PhD. I have changed fields and now I work in the [Bioimage Analysis and Machine Learning Group of Peter Horvath](http:\u002F\u002Fgroup.szbk.u-szeged.hu\u002Fsysbiol\u002Fhorvath-peter-lab-index.html), where I am working to develop active learning strategies for intelligent sample analysis in biology. During my work I realized that in Python, creating and prototyping active learning workflows can be made really easy and fast with scikit-learn, so I ended up developing a general framework for this. The result is modAL :) If you have any questions, requests or suggestions, you can contact me at \u003Ca href=\"mailto:85a5187a@opayq.com\">85a5187a@opayq.com\u003C\u002Fa>! I hope you'll find modAL useful!\n","\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FmodAL-python_modAL_readme_c7efdccfaf61.png\" alt=\"modAL\" style=\"width: 400px;\">\n\n适用于 Python3 的模块化主动学习框架\n\n[![travis-ci-master](https:\u002F\u002Ftravis-ci.org\u002FmodAL-python\u002FmodAL.svg?branch=master)](https:\u002F\u002Ftravis-ci.org\u002FmodAL-python\u002FmodAL) [![codecov-master](https:\u002F\u002Fcodecov.io\u002Fgh\u002FmodAL-python\u002FmodAL\u002Fbranch\u002Fmaster\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002FmodAL-python\u002FmodAL) [![readthedocs](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FmodAL-python_modAL_readme_6bf48b3e9a6d.png)](http:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002F?badge=latest)\n\n## 页面内容\n- [简介](#introduction)  \n- [从宏观视角看主动学习](#active-learning)  \n- [modAL实战](#modAL-in-action)\n  - [几行代码实现从零到一](#initialization)  \n  - [快速替换组件](#replacing-parts)  \n  - [用自定义方案替换组件](#replacing-parts-with-your-own-solutions)  \n  - [主动回归示例](#active-regression)\n  - [更多示例](#additional-examples)  \n- [安装](#installation)  \n- [文档](#documentation)  \n- [引用](#citing)  \n- [关于开发者](#about-the-developer)\n\n# 简介\u003Ca name=\"introduction\">\u003C\u002Fa>\nmodAL 是一个专为 Python3 设计的主动学习框架，其核心理念是*模块化、灵活性*和*可扩展性*。该框架基于 scikit-learn 构建，使您能够以几乎完全自由的方式快速搭建主动学习工作流。此外，您可以轻松地用自定义解决方案替换现有组件，从而轻松设计出新颖的算法。\n\n# 从宏观视角看主动学习\u003Ca name=\"active-learning\">\u003C\u002Fa>\n随着可用数据的激增，您可能拥有数百万条未标注的数据，而获取这些标签的成本却非常高昂。例如，在预测推文情感时，构建训练集往往需要大量的人工劳动。不过别担心，主动学习正是解决这一问题的利器！一般来说，主动学习是一种通过智能地选择最具信息量的样本进行标注，从而提升分类性能的方法。举个例子，假设您有如下数据和分类器，其中阴影区域表示分类概率。\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FmodAL-python_modAL_readme_9db001304c27.png\" height=\"600px\" width=\"600px\"\u002F>\n\u003C\u002Fp>\n\n假设您可以查询某个未标注样本的标签，但代价不菲。那么您会选择哪一个呢？显然，在不确定性较高的区域进行查询，比随机选择能获得更多信息。主动学习为您提供了一套工具来应对这类问题。通常，主动学习的工作流程如下所示。\n\n\u003Cp align=\"center\">\n \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FmodAL-python_modAL_readme_f35cc829e922.png\"\u002F>\n\u003C\u002Fp>\n\n任何工作流的关键组成部分包括您选择的**模型**、使用的**不确定性度量**以及用于请求标签的**查询策略**。借助 modAL，您不必局限于少量内置组件，而是可以无缝集成 scikit-learn 或 Keras 模型，并轻松定制自己的查询策略和不确定性度量。\n\n# modAL实战\u003Ca name=\"modAL-in-action\">\u003C\u002Fa>\n让我们来看看 modAL 能为您做些什么！\n\n## 几行代码实现从零到一\u003Ca name=\"initialization\">\u003C\u002Fa>\n使用 scikit-learn 分类器（例如 RandomForestClassifier）进行主动学习，可以简单到以下代码：\n```python\nfrom modAL.models import ActiveLearner\nfrom sklearn.ensemble import RandomForestClassifier\n\n# 初始化学习器\nlearner = ActiveLearner(\n    estimator=RandomForestClassifier(),\n    X_training=X_training, y_training=y_training\n)\n\n# 查询待标注样本\nquery_idx, query_inst = learner.query(X_pool)\n\n# ...从“Oracle”获取新标签...\n\n# 为查询到的样本提供标签\nlearner.teach(X_pool[query_idx], y_new)\n```\n\n## 快速替换组件\u003Ca name=\"replacing-parts\">\u003C\u002Fa>\n如果您希望使用不同于默认不确定性采样的其他不确定性度量和查询策略，可以直接替换为几种内置策略，也可以遵循一些简单的设计原则来开发自己的策略。例如，将默认的不确定性度量替换为分类熵，代码如下：\n```python\nfrom modAL.models import ActiveLearner\nfrom modAL.uncertainty import entropy_sampling\nfrom sklearn.ensemble import RandomForestClassifier\n\nlearner = ActiveLearner(\n    estimator=RandomForestClassifier(),\n    query_strategy=entropy_sampling,\n    X_training=X_training, y_training=y_training\n)\n```\n\n## 用自定义方案替换组件\u003Ca name=\"replacing-parts-with-your-own-solutions\">\u003C\u002Fa>\nmodAL 的设计宗旨之一就是让您轻松实现自定义查询策略。例如，实现并使用一种简单的随机采样策略，只需如下代码：\n```python\nimport numpy as np\n\ndef random_sampling(classifier, X_pool):\n    n_samples = len(X_pool)\n    query_idx = np.random.choice(range(n_samples))\n    return query_idx, X_pool[query_idx]\n\nlearner = ActiveLearner(\n    estimator=RandomForestClassifier(),\n    query_strategy=random_sampling,\n    X_training=X_training, y_training=y_training\n)\n```\n有关如何实现自定义策略的更多详细信息，请访问页面[扩展 modAL](https:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Foverview\u002FExtending-modAL.html)!\n\n## 带有主动回归的示例\u003Ca name=\"active-regression\">\u003C\u002Fa>\n为了亲眼见证 modAL 的实际应用，我们来考虑一个基于高斯过程的主动回归问题！在这个示例中，我们将尝试学习 *带噪声的正弦函数*：\n```python\nimport numpy as np\n\nX = np.random.choice(np.linspace(0, 20, 10000), size=200, replace=False).reshape(-1, 1)\ny = np.sin(X) + np.random.normal(scale=0.3, size=X.shape)\n```\n对于主动学习，我们需要定义一个专为高斯过程定制的查询策略。简而言之，modAL 中的 *查询策略* 是一个至少接受两个参数（一个估计器对象和一个待选样本池）的函数，它会返回被查询实例的索引。在我们的例子中，这两个参数分别是 `regressor` 和 `X`。\n```python\ndef GP_regression_std(regressor, X):\n    _, std = regressor.predict(X, return_std=True)\n    return np.argmax(std)\n```\n在设置好查询策略和数据后，就可以初始化主动学习器了。\n```python\nfrom modAL.models import ActiveLearner\nfrom sklearn.gaussian_process import GaussianProcessRegressor\nfrom sklearn.gaussian_process.kernels import WhiteKernel, RBF\n\nn_initial = 5\ninitial_idx = np.random.choice(range(len(X)), size=n_initial, replace=False)\nX_training, y_training = X[initial_idx], y[initial_idx]\n\nkernel = RBF(length_scale=1.0, length_scale_bounds=(1e-2, 1e3)) \\\n         + WhiteKernel(noise_level=1, noise_level_bounds=(1e-10, 1e+1))\n\nregressor = ActiveLearner(\n    estimator=GaussianProcessRegressor(kernel=kernel),\n    query_strategy=GP_regression_std,\n    X_training=X_training.reshape(-1, 1), y_training=y_training.reshape(-1, 1)\n)\n```\n初始的回归模型并不太准确。\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FmodAL-python_modAL_readme_74d0b374788a.png\">\n\u003C\u002Fp>\n\n蓝色区域包裹着回归曲线，表示在该点处高斯过程的标准差。现在我们可以开始进行主动学习了！\n```python\n# 主动学习\nn_queries = 10\nfor idx in range(n_queries):\n    query_idx, query_instance = regressor.query(X)\n    regressor.teach(X[query_idx].reshape(1, -1), y[query_idx].reshape(1, -1))\n```\n经过几次查询后，我们可以看到预测效果有了显著提升。\n\n\u003Cp align=\"center\">\n \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FmodAL-python_modAL_readme_8c8bba42411e.png\">\n\u003C\u002Fp>\n\n## 更多示例\u003Ca name=\"additional-examples\">\u003C\u002Fa>\n除了这个示例之外，还有许多其他示例可供参考：\n- [基于池的采样](https:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fexamples\u002Fpool-based_sampling.html)  \n- [基于流的采样](https:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fexamples\u002Fstream-based_sampling.html)  \n- [主动回归](https:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fexamples\u002Factive_regression.html)  \n- [集成回归](https:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fexamples\u002Fensemble_regression.html)  \n- [贝叶斯优化](https:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fexamples\u002Fbayesian_optimization.html)  \n- [委员会查询](https:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fexamples\u002Fquery_by_committee.html)  \n- [自助法与装袋法](https:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fexamples\u002Fbootstrapping_and_bagging.html)  \n- [Keras 集成](https:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fexamples\u002FKeras_integration.html)\n\n# 安装\u003Ca name=\"installation\">\u003C\u002Fa>\nmodAL 需要以下依赖：\n- Python >= 3.5\n- NumPy >= 1.13\n- SciPy >= 0.18\n- scikit-learn >= 0.18\n\n你可以直接使用 pip 安装 modAL：\n```\npip install modAL-python\n```\n或者，你也可以从源代码直接安装：\n```\npip install git+https:\u002F\u002Fgithub.com\u002FmodAL-python\u002FmodAL.git\n```\n\n# 文档\u003Ca name=\"documentation\">\u003C\u002Fa>\n你可以在 [https:\u002F\u002FmodAL-python.github.io](https:\u002F\u002FmodAL-python.github.io) 找到 modAL 的文档，其中包含多个教程和可运行的示例，以及完整的 API 参考。为了更好地运行这些示例，建议安装 Matplotlib >= 2.0。\n\n# 引用\u003Ca name=\"citing\">\u003C\u002Fa>\n如果你在项目中使用了 modAL，可以这样引用：\n```\n@article{modAL2018,\n    title={mod{AL}: {A} modular active learning framework for {P}ython},\n    author={Tivadar Danka and Peter Horvath},\n    url={https:\u002F\u002Fgithub.com\u002FmodAL-python\u002FmodAL},\n    note={available on arXiv at \\url{https:\u002F\u002Farxiv.org\u002Fabs\u002F1805.00979}}\n}\n```\n\n# 关于开发者\u003Ca name=\"about-the-developer\">\nmodAL 由我开发，我是 [Tivadar Danka](https:\u002F\u002Fwww.tivadardanka.com)（GitHub 上的昵称是 [cosmic-cortex](https:\u002F\u002Fgithub.com\u002Fcosmic-cortex)）。我拥有纯数学博士学位，但在博士毕业后不久便爱上了生物学和机器学习。我转行进入了 [Peter Horvath 的生物图像分析与机器学习研究组](http:\u002F\u002Fgroup.szbk.u-szeged.hu\u002Fsysbiol\u002Fhorvath-peter-lab-index.html)，在那里我致力于开发用于生物智能样本分析的主动学习策略。在工作中，我意识到利用 scikit-learn 在 Python 中构建和原型化主动学习流程可以非常简单快捷，因此我最终开发出了一个通用框架——这就是 modAL :) 如果你有任何问题、需求或建议，欢迎通过电子邮件 \u003Ca href=\"mailto:85a5187a@opayq.com\">85a5187a@opayq.com\u003C\u002Fa> 联系我！希望你能觉得 modAL 很有用！","# modAL 快速上手指南\n\nmodAL 是一个专为 Python 3 设计的模块化主动学习（Active Learning）框架。它构建在 scikit-learn 之上，具有高度的灵活性、可扩展性和模块化特性，允许开发者轻松集成自定义的查询策略和不确定性度量，快速构建高效的主动学习工作流。\n\n## 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **操作系统**：支持 Linux, macOS, Windows\n*   **Python 版本**：>= 3.5\n*   **核心依赖**：\n    *   NumPy >= 1.13\n    *   SciPy >= 0.18\n    *   scikit-learn >= 0.18\n\n> **提示**：运行文档中的可视化示例建议安装 `Matplotlib >= 2.0`。\n\n## 安装步骤\n\n您可以使用 `pip` 直接安装稳定版，或从源码安装最新版。\n\n### 方式一：通过 PyPI 安装（推荐）\n\n```bash\npip install modAL-python\n```\n\n*(国内用户若下载缓慢，可添加清华或阿里镜像源加速)*\n```bash\npip install modAL-python -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n### 方式二：从 GitHub 源码安装\n\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002FmodAL-python\u002FmodAL.git\n```\n\n## 基本使用\n\nmodAL 的核心流程非常简单：初始化学习器 -> 查询最有价值的样本 -> 获取标签 -> 更新模型。以下是一个基于 `RandomForestClassifier` 的最简示例。\n\n### 1. 初始化与查询\n\n```python\nfrom modAL.models import ActiveLearner\nfrom sklearn.ensemble import RandomForestClassifier\n\n# 假设 X_training, y_training 为初始少量带标签数据\n# X_pool 为大量未标记数据池\n\n# 初始化主动学习器\nlearner = ActiveLearner(\n    estimator=RandomForestClassifier(),\n    X_training=X_training, \n    y_training=y_training\n)\n\n# 查询策略：让模型选出信息量最大的样本索引和数据\nquery_idx, query_inst = learner.query(X_pool)\n\n# ...此处模拟人工标注过程，获取新标签 (y_new)...\n# y_new = oracle_label(query_inst) \n\n# 将新标注的数据教给模型（增量更新）\nlearner.teach(X_pool[query_idx], y_new)\n```\n\n### 2. 替换查询策略\n\nmodAL 允许轻松切换内置策略或自定义策略。例如，将默认的“不确定性采样”替换为“熵采样”：\n\n```python\nfrom modAL.models import ActiveLearner\nfrom modAL.uncertainty import entropy_sampling\nfrom sklearn.ensemble import RandomForestClassifier\n\nlearner = ActiveLearner(\n    estimator=RandomForestClassifier(),\n    query_strategy=entropy_sampling,  # 指定新的策略\n    X_training=X_training, \n    y_training=y_training\n)\n```\n\n### 3. 自定义策略示例\n\n您也可以编写自己的查询函数。以下是一个简单的随机采样策略实现：\n\n```python\nimport numpy as np\n\ndef random_sampling(classifier, X_pool):\n    n_samples = len(X_pool)\n    # 随机选择一个索引\n    query_idx = np.random.choice(range(n_samples))\n    return query_idx, X_pool[query_idx]\n\nlearner = ActiveLearner(\n    estimator=RandomForestClassifier(),\n    query_strategy=random_sampling,  # 使用自定义函数\n    X_training=X_training, \n    y_training=y_training\n)\n```\n\n通过以上步骤，您即可快速搭建起一个基础的主动学习闭环。更多高级用法（如回归任务、Keras 集成、委员会查询等）请参考官方文档。","某电商初创公司的数据科学团队正致力于构建一个评论情感分析模型，但面对百万条未标注的用户评论，人工标注成本高昂且耗时。\n\n### 没有 modAL 时\n- **标注资源浪费**：团队只能随机抽取数据进行标注，导致大量简单、信息量低的样本（如明显的“好评”）被重复标注，浪费了宝贵的人工预算。\n- **算法迭代僵化**：若要尝试不同的不确定性度量策略（如从熵值改为边际采样），需要重写大量底层代码，难以快速验证哪种策略更适合当前业务。\n- **模型集成困难**：希望将现有的 Scikit-learn 随机森林模型升级为主动学习流程时，需手动编写复杂的查询循环和数据管理逻辑，开发周期长达数周。\n- **冷启动效率低**：在初始训练数据极少的情况下，模型收敛缓慢，无法在短时间内达到可用的准确率水平。\n\n### 使用 modAL 后\n- **智能筛选样本**：modAL 自动识别并优先推送那些模型最“不确定”的评论供人工标注，用同样的标注预算使模型准确率提升了 20%。\n- **策略灵活替换**：借助其模块化设计，团队成员仅用几行代码即可切换不同的查询策略或自定义不确定性算法，当天就能完成策略对比实验。\n- **无缝集成现有模型**：直接将原有的 Scikit-learn 分类器封装为 `ActiveLearner`，无需重构底层逻辑，半天内便搭建起完整的主动学习工作流。\n- **快速冷启动**：通过智能查询最具信息量的初始样本，模型在仅需标注少量数据的情况下便迅速收敛，大幅缩短了项目上线时间。\n\nmodAL 通过智能化的样本查询策略和高度灵活的架构，让团队以最低的成本实现了模型性能的最大化飞跃。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FmodAL-python_modAL_9db00130.png","modAL-python","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FmodAL-python_1a7aef48.png","A modular active learning framework for Python3",null,"https:\u002F\u002Fgithub.com\u002FmodAL-python",[81,85],{"name":82,"color":83,"percentage":84},"Python","#3572A5",99.9,{"name":86,"color":87,"percentage":88},"Shell","#89e051",0.1,2343,327,"2026-04-03T18:58:15","MIT",1,"","未说明",{"notes":97,"python":98,"dependencies":99},"该工具是一个基于 scikit-learn 的主动学习框架，支持分类和回归任务。虽然核心依赖未强制要求，但文档提到若要运行示例代码，建议安装 Matplotlib>=2.0。此外，该框架设计为模块化，可轻松集成 Keras 模型（需自行安装 Keras 及相关后端如 TensorFlow）。",">=3.5",[100,101,102],"NumPy>=1.13","SciPy>=0.18","scikit-learn>=0.18",[53,13],[105,106,107,108,109,110,111,112,113],"scikit-learn","machine-learning","python","active-learning","machine-learning-library","machine-learning-algorithms","machine-learning-api","active-learning-module","bayesian-optimization","2026-03-27T02:49:30.150509","2026-04-06T05:26:21.666908",[117,122,127,132,137,142,146],{"id":118,"question_zh":119,"answer_zh":120,"source_url":121},15430,"安装 modAL 后导入时出现 'No module named modAL' 或 'modAL is not a package' 错误，如何解决？","如果通过 pip install modAL 安装后遇到此问题，可以尝试直接从源代码安装。请运行以下命令：\npip install git+https:\u002F\u002Fgithub.com\u002FmodAL-python\u002FmodAL.git\n这通常能解决因包结构或版本问题导致的导入错误。","https:\u002F\u002Fgithub.com\u002FmodAL-python\u002FmodAL\u002Fissues\u002F31",{"id":123,"question_zh":124,"answer_zh":125,"source_url":126},15431,"如何在 Query by Committee 策略中使用 vote_entropy 或 KL_Divergence 代替 consensus entropy？","vote_entropy 和 KL_Divergence 是度量标准而非直接的查询策略函数。您可以参考官方文档中的信息密度方法（https:\u002F\u002Fmodal-python.readthedocs.io\u002Fen\u002Flatest\u002Fcontent\u002Fquery_strategies\u002Finformation_density.html）。这些方法主要用于编写自定义查询策略，您需要利用这些度量值自行实现查询逻辑。","https:\u002F\u002Fgithub.com\u002FmodAL-python\u002FmodAL\u002Fissues\u002F92",{"id":128,"question_zh":129,"answer_zh":130,"source_url":131},15432,"modAL 是否支持批量模式（batch-mode）的主动学习查询？","是的，modAL 支持批量查询。虽然基础的不确定性采样等策略支持 n_instances 参数，但直接返回多个实例可能导致冗余。对于更优化的批量选择，建议实现或参考如 Cardoso 等人提出的\"Ranked batch-mode active learning\"算法。社区已讨论过将其集成到库中，用户也可以基于现有接口自行实现批量采样逻辑。","https:\u002F\u002Fgithub.com\u002FmodAL-python\u002FmodAL\u002Fissues\u002F11",{"id":133,"question_zh":134,"answer_zh":135,"source_url":136},15433,"如何在使用 Keras\u002FTensorFlow 模型时切换不同的查询策略（如 expected_error_reduction）？","在初始化 ActiveLearner 时，直接将所需的查询策略函数传递给 query_strategy 参数即可。例如：\nlearner = ActiveLearner(\n    estimator=classifier,\n    query_strategy=expected_error_reduction,\n    X_training=x_initial_training,\n    y_training=y_initial_training\n)\n如果在切换策略时报错，请确保传入的是有效的策略函数对象，并且该策略与您的估计器（estimator）兼容。","https:\u002F\u002Fgithub.com\u002FmodAL-python\u002FmodAL\u002Fissues\u002F41",{"id":138,"question_zh":139,"answer_zh":140,"source_url":141},15434," Ranked Batch Sampling 中的冷启动（cold start）处理机制是如何工作的？","在当前的实现中，冷启动阶段选择的实例并没有被添加到 instance_index_ranking 列表中，这与某些论文（如 Cardoso et al.）的描述可能不同。维护者正在讨论重构查询策略，计划将冷启动处理机制作为参数传递给查询策略或 Learner，以便更灵活地控制冷启动行为。目前如需修改，可能需要调整 batch.py 中的 select_cold_start_instance 返回值及相关逻辑。","https:\u002F\u002Fgithub.com\u002FmodAL-python\u002FmodAL\u002Fissues\u002F28",{"id":143,"question_zh":144,"answer_zh":145,"source_url":126},15435,"modAL 中是否有分层采样（Hierarchical sampling）功能？","目前 modAL 尚未实现分层采样功能。维护者表示有计划但未实施。当前已实现的密度加权方法可以在官方文档的信息密度部分找到，它们主要作为度量标准供用户编写自定义查询策略使用，而非开箱即用的独立策略。",{"id":147,"question_zh":148,"answer_zh":149,"source_url":141},15436,"uncertainty_sampling、margin_sampling 和 entropy_sampling 等函数的代码重复度很高，未来会优化吗？","维护者承认这些函数的实现几乎相同，仅调用的效用计算函数不同。计划通过函数工厂（function factory）或将查询策略提升为 QueryStrategy 类的方式来重构代码，以减少重复并允许更灵活的配置（如不同的评分器和冷启动处理器）。",[151,155,160,165,170,175,180,185,190,195,200,205,210],{"id":152,"version":153,"summary_zh":78,"released_at":154},90090,"0.4.2","2023-06-01T11:15:57",{"id":156,"version":157,"summary_zh":158,"released_at":159},90091,"0.4.1","# 发行说明\n本次发布包含对 `0.4.0` 版本中新增功能的一个修复。\n\n## 修复\n* #108：如果数据转换是通过学习得到的，那么转换后的数据无法被存储，每次查询时都需要重新计算。此问题已由 @BoyanH 在 #113 中修复。","2021-01-07T09:54:00",{"id":161,"version":162,"summary_zh":163,"released_at":164},90092,"0.4.0","# 发行说明\nmodAL 0.4.0 终于发布了！本次新版本的发布离不开 @BoyanH、@damienlancry 和 @OskarLiew 的贡献，在此向他们表示衷心的感谢！\n\n## 新特性\n* `pandas.DataFrame` 支持，感谢 @BoyanH！这是一项用户呼声很高的功能，此前我一直未能妥善实现，但 @BoyanH 在 #105 中找到了解决方案。\n* 对 scikit-learn 管道的支持，同样由 @BoyanH 实现。现在，学习器在初始化时通过设置 `on_transformed=True`，即可对变换后的数据进行查询。\n\n## 变更\n* 查询策略不再返回被选中的实例，而仅返回所查询对象的索引。（参见 @BoyanH 提交的 #104。）\n\n## 修复\n* `Committee` 类在拟合时会设置类别标签，这一改动解决了在初始化时未提供训练数据时出现的错误。该修复由 @OskarLiew 在 #100 中贡献，再次感谢！\n* 排序批次模式采样示例中的一些拼写错误，已由 @damienlancry 修复。","2020-11-01T09:28:14",{"id":166,"version":167,"summary_zh":168,"released_at":169},90093,"0.3.6","# 修复\r\n* 更新 `Committee.teach()` 的已知类 (#63)\r\n","2020-08-21T06:20:44",{"id":171,"version":172,"summary_zh":173,"released_at":174},90094,"0.3.5","## 变更\n* `ActiveLearner` 现在通过在初始化时设置 `force_all_finite=False`，支持数据中的 `np.nan` 和 `np.inf`。#58\n* 多维函数的贝叶斯优化已修复。\n* 对 `check_X_y` 的调用不再进行数据类型之间的转换。#49\n* 期望误差减少实现中的错误已修复。#45\n* `modAL.utils.data_vstack` 现在会在可能的情况下回退到使用 `numpy.concatenate`。\n* 排序批量采样和期望误差减少中多维数据的问题已修复。#41\n\n由 @zhangyu94 修复的：\n* `modAL.selection.shuffled_argmax` #32\n* `modAL.batch.ranked_batch` 中冷启动实例的问题已修复。#30\n* `modAL.batch.select_instance` 中最佳实例索引的问题已修复。#29","2019-11-11T10:58:35",{"id":176,"version":177,"summary_zh":178,"released_at":179},90095,"0.3.4","## 新特性\n* 为处理最大效用分数不唯一的情况，引入了随机破冰选项。从本版本开始，向查询策略传递 ```random_tie_break=True``` 时，会先对池中的样本进行打乱，再使用稳定排序来确定待查询的实例。当最大效用分数不唯一时，这等价于从得分最高的实例中随机采样。\n\n## 变更\n* 改进了 ```modAL.expected_error.expected_error_reduction``` 的运行效率，通过省略对池中每个实例都进行估计器克隆的操作来实现。","2018-12-05T12:52:47",{"id":181,"version":182,"summary_zh":183,"released_at":184},90096,"0.3.3","## 新特性\n在本次小版本中，新增了期望误差和对数损失缩减算法（[Roy 和 McCallum, 2001](https:\u002F\u002Fdl.acm.org\u002Fcitation.cfm?id=655646)）。\n","2018-11-30T10:02:00",{"id":186,"version":187,"summary_zh":188,"released_at":189},90097,"0.3.2","## 新特性\n在本版本中，重点放在多标签主动学习策略上。新增了以下算法：\n- SVM 二分类最小化法（[Brinker](https:\u002F\u002Flink.springer.com\u002Fchapter\u002F10.1007%2F3-540-31314-1_24)）\n- 最大损失、平均最大损失（[Li 等](http:\u002F\u002Fdx.doi.org\u002F10.1109\u002FICIP.2004.1421535)）\n- 最小置信度、平均置信度、最小得分、平均得分（[Esuli 和 Sebastiani](http:\u002F\u002Fdx.doi.org\u002F10.1007\u002F978-3-642-00958-7_12)）","2018-11-26T16:04:03",{"id":191,"version":192,"summary_zh":193,"released_at":194},90098,"0.3.1","# 发行说明\n\nmodAL 的新版本发布啦！这标志着它发展的一个重要里程碑，因为这是我们首次收到来自开源社区的贡献！:) 感谢 @dataframing 和 @nikolay-bushkov 的辛勤工作！我们期待看到更多来自社区的贡献，因为 modAL 仍然有很长的路要走！ :)\n\n## 新特性\n- @dataframing 实现了排序批量模式查询。通过这种查询策略，可以同时请求标注多个样本，从而有效缓解不确定性采样中的一些问题。详情请参阅 [Cardoso 等人的排序批量学习](https:\u002F\u002Fwww.sciencedirect.com\u002Fscience\u002Farticle\u002Fpii\u002FS0020025516313949)。\n- @nikolay-bushkov 添加了稀疏矩阵支持。从现在起，如果估计器能够处理稀疏矩阵，你就可以使用它们来拟合主动学习模型了！\n- 所有模型都新增了冷启动支持。这意味着现在无需先训练模型，即可直接调用 ```learner.query()```。\n\n## 变更\n- 在 @nikolay-bushkov 的努力下，文档进行了大规模重构！添加了类型注解，并将 docstring 重构为遵循 Google 风格的格式。网站也相应地进行了调整：不再使用 GitHub Pages，而是采用 ReadTheDocs，并将旧网站与 API 参考文档合并。此外，@dataframing 还添加了 Jupyter 笔记本示例。\n详细信息请访问 [https:\u002F\u002FmodAL-python.github.io\u002F](https:\u002F\u002FmodAL-python.github.io\u002F)！\n- 修改了 ```BaseLearner``` 和 ```BaseCommittee``` 中的 ```.query()``` 方法，以支持更通用的查询策略参数。现在，只要 ```query_strategy``` 函数能够接受，就可以传递任意参数。\n- 为 ```Committee``` 类添加了 ```.score()``` 方法，修复了 #6 问题。\n- 使用 ```sklearn.metrics.pairwise``` 中的函数重构了 ```modAL.density``` 模块。这不仅显著提升了性能，还使该模块的代码库更加可持续。\n\n## Bug 修复\n- 修复了对 1D 数组的处理问题，将 ```numpy.vstack``` 调用替换为 ```numpy.concatenate```。\n修复了 #15 问题。\n- 将 ```np.sum(generator)``` 调用替换为 ```np.sum(np.from_iter(generator))```，以应对前者即将被弃用的情况。","2018-10-02T17:47:12",{"id":196,"version":197,"summary_zh":198,"released_at":199},90099,"0.3.0","# 发行说明\n\n## 新特性\n- **贝叶斯优化。** 贝叶斯优化是一种用于优化黑盒函数的方法，这类函数的评估可能非常昂贵，且通常无法获得导数信息。它采用与主动学习非常相似的查询循环，因此可以使用与 ```ActiveLearner``` 完全相同的 API 来实现。对取值的采样是通过估计每个点可能收益的策略来进行的。目前实现了三种策略：*改进概率*、*期望改进* 和 *上置信界*。\n\n## 变更\n- 实现了抽象基类 ```modAL.models.BaseLearner```。```ActiveLearner``` 和 ```BayesianOptimizer``` 均继承自该基类。\n- ```modAL.models.ActiveLearner.query()``` 现在会将 ```ActiveLearner``` 对象传递给查询函数，而不仅仅是估计器。\n\n## 修复\n- ```modAL.utils.selection.multi_argmax()``` 现在既能处理形状为 ```(-1, )``` 的数组，也能处理形状为 ```(-1, 1)``` 的数组。","2018-04-25T08:59:59",{"id":201,"version":202,"summary_zh":203,"released_at":204},90100,"0.2.1","# 发行说明\n## 新特性\n- 引入 ```modAL.utils.combination.make_query_strategy``` 函数工厂，简化自定义查询策略的实现。\n- ```ActiveLearner``` 和 ```Committee``` 模型现在可以通过在 `.teach()` 方法中传入 `only_new=True` 参数，仅使用新数据进行拟合。这在处理那些不需要从头开始训练的模型时非常有用，例如 TensorFlow 或 Keras 模型。\n\n## 修复\n- 向 ```modAL.utils.selection.weighted_random()``` 添加了检查，以避免除零错误。\n- ABC 元类机制现已兼容较早版本的 Python（即 Python 2.7）。修复了 #3 问题。\n- 从 ```modAL.models``` 中移除了 ```sklearn.utils.check_array``` 调用，相关检查现由估计器自行完成。因此，图像无需再进行展平处理。修复了 #5 问题。\n- ```BaseCommittee``` 现在继承自 ```sklearn.base.BaseEstimator```。\n- ```modAL.utils.combination.make_linear_combination``` 已使用生成器表达式重写，从而提升了性能。","2018-04-18T08:45:02",{"id":206,"version":207,"summary_zh":208,"released_at":209},90101,"0.2.0","# Release notes\r\n\r\n## New features\r\n* **Information density measures.** With the information_density function in modAL.density, density-based information metrics can be employed.\r\n* **Functions for making new utility measures by linear combinations and products.** With the function factories in modAL.utils.combination, functions can be transformed into their linear combination and product.\r\n\r\n## Changes\r\n* ActiveLearner constructor arguments renamed: ```predictor``` was renamed to ```estimator```, ```X_initial``` and ```y_initial``` was renamed to ```X_training``` and ```y_training```.\r\n* ActiveLearner, Committee and CommitteeRegressor now also inherits from sklearn.base.BaseEstimator. Because of this, for instance, get_params() and set_params() methods can be used. \r\n* The private attributes of ActiveLearner, Committee and CommitteeRegressor now exposed as public attributes. \r\n* As a result of the previous, the classes now can be cloned with sklearn.base.clone.","2018-02-10T11:42:18",{"id":211,"version":212,"summary_zh":213,"released_at":214},90102,"0.1.0","# modAL 0.1.0\r\n\r\nModular Active Learning framework for Python3\r\n\r\n## Release notes\r\nmodAL is finally released! For its capabilities and documentation, see the page [https:\u002F\u002Fcosmic-cortex.github.io\u002FmodAL\u002F](https:\u002F\u002Fcosmic-cortex.github.io\u002FmodAL\u002F)!\r\n\r\n## Installation\r\n\r\nmodAL requires\r\n- Python >= 3.5\r\n- NumPy >= 1.13\r\n- SciPy >= 0.18\r\n- scikit-learn >= 0.18\r\n\r\nYou can install modAL directly with pip:  \r\n```\r\npip install modAL\r\n```\r\nAlternatively, you can install modAL directly from source:  \r\n```\r\npip install git+https:\u002F\u002Fgithub.com\u002Fcosmic-cortex\u002FmodAL.git","2018-01-08T12:11:11"]