[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-yoshoku--rumale":3,"tool-yoshoku--rumale":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},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,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},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 真正成长为懂上",141543,2,"2026-04-06T11:32:54",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107888,"2026-04-06T11:32:50",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"status":17},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[35,15,13,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":76,"owner_location":77,"owner_email":78,"owner_twitter":76,"owner_website":76,"owner_url":79,"languages":80,"stars":96,"forks":97,"last_commit_at":98,"license":99,"difficulty_score":100,"env_os":101,"env_gpu":102,"env_ram":101,"env_deps":103,"category_tags":110,"github_topics":112,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":120,"updated_at":121,"faqs":122,"releases":148},4618,"yoshoku\u002Frumale","rumale","Rumale is a machine learning library in Ruby","Rumale 是一款专为 Ruby 语言打造的机器学习库，旨在让 Ruby 开发者也能轻松构建智能应用。它填补了 Ruby 生态中缺乏成熟、统一机器学习工具的空白，无需切换至 Python 即可在熟悉的环境中完成从数据预处理、模型训练到评估预测的全流程。\n\nRumale 的接口设计高度借鉴了 Python 中广受欢迎的 Scikit-Learn，学习曲线平缓，代码风格直观易懂。其算法覆盖全面，不仅支持支持向量机、逻辑回归、随机森林等经典监督学习模型，还包含 K-Means、t-SNE、主成分分析等无监督学习与降维工具。自 2.0 版本起，Rumale 采用高性能的 Numo::NArray Alternative 作为底层计算依赖，显著提升了数值运算效率。\n\n无论是希望将机器学习功能集成到现有 Ruby 项目的后端工程师，还是偏好 Ruby 语法的数据研究人员，Rumale 都是理想选择。它提供了如加载 LIBSVM 格式数据、交叉验证、模型持久化等实用功能，并配有详尽的 API 文档与示例代码，帮助用户快速上手。如果你正在寻找一个轻量、稳定且功能丰富的 Ruby 机器学习方案，Rum","Rumale 是一款专为 Ruby 语言打造的机器学习库，旨在让 Ruby 开发者也能轻松构建智能应用。它填补了 Ruby 生态中缺乏成熟、统一机器学习工具的空白，无需切换至 Python 即可在熟悉的环境中完成从数据预处理、模型训练到评估预测的全流程。\n\nRumale 的接口设计高度借鉴了 Python 中广受欢迎的 Scikit-Learn，学习曲线平缓，代码风格直观易懂。其算法覆盖全面，不仅支持支持向量机、逻辑回归、随机森林等经典监督学习模型，还包含 K-Means、t-SNE、主成分分析等无监督学习与降维工具。自 2.0 版本起，Rumale 采用高性能的 Numo::NArray Alternative 作为底层计算依赖，显著提升了数值运算效率。\n\n无论是希望将机器学习功能集成到现有 Ruby 项目的后端工程师，还是偏好 Ruby 语法的数据研究人员，Rumale 都是理想选择。它提供了如加载 LIBSVM 格式数据、交叉验证、模型持久化等实用功能，并配有详尽的 API 文档与示例代码，帮助用户快速上手。如果你正在寻找一个轻量、稳定且功能丰富的 Ruby 机器学习方案，Rumale 值得尝试。","# Rumale\n\n![Rumale](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fyoshoku_rumale_readme_415e39a3f753.png)\n\n[![Build Status](https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Frumale\u002Factions\u002Fworkflows\u002Fmain.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Frumale\u002Factions\u002Fworkflows\u002Fmain.yml)\n[![Gem Version](https:\u002F\u002Fbadge.fury.io\u002Frb\u002Frumale.svg)](https:\u002F\u002Fbadge.fury.io\u002Frb\u002Frumale)\n[![BSD 3-Clause License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-BSD%203--Clause-orange.svg)](https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Frumale\u002Fblob\u002Fmain\u002FLICENSE.txt)\n[![Documentation](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fapi-reference-blue.svg)](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002F)\n[![DOI](https:\u002F\u002Fzenodo.org\u002Fbadge\u002F105371532.svg)](https:\u002F\u002Fdoi.org\u002F10.5281\u002Fzenodo.14590520)\n\nRumale (**Ru**by **ma**chine **le**arning) is a machine learning library in Ruby.\nRumale provides machine learning algorithms with interfaces similar to Scikit-Learn in Python.\nRumale supports Support Vector Machine,\nLogistic Regression, Ridge, Lasso,\nMulti-layer Perceptron,\nNaive Bayes, Decision Tree, Gradient Tree Boosting, Random Forest,\nK-Means, Gaussian Mixture Model, DBSCAN, Spectral Clustering,\nMutidimensional Scaling, t-SNE,\nFisher Discriminant Analysis, Neighbourhood Component Analysis,\nPrincipal Component Analysis, Non-negative Matrix Factorization,\nand many other algorithms.\n\n**Note**: Since v2.0.0, Rumale uses [Numo::NArray Alternative](https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Fnumo-narray-alt)\ninstead of Numo::NArray as a dependency.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'rumale'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install rumale\n\n## Documentation\n\n- [Rumale API Documentation](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002F)\n\n## Usage\n\n### Example 1. Pendigits dataset classification\n\nRumale provides function loading libsvm format dataset file.\nWe start by downloading the pendigits dataset from LIBSVM Data web site.\n\n```bash\n$ wget https:\u002F\u002Fwww.csie.ntu.edu.tw\u002F~cjlin\u002Flibsvmtools\u002Fdatasets\u002Fmulticlass\u002Fpendigits\n$ wget https:\u002F\u002Fwww.csie.ntu.edu.tw\u002F~cjlin\u002Flibsvmtools\u002Fdatasets\u002Fmulticlass\u002Fpendigits.t\n```\n\nTraining of the classifier with Linear SVM and RBF kernel feature map is the following code.\n\n```ruby\nrequire 'rumale'\n\n# Load the training dataset.\nsamples, labels = Rumale::Dataset.load_libsvm_file('pendigits')\n\n# Map training data to RBF kernel feature space.\ntransformer = Rumale::KernelApproximation::RBF.new(gamma: 0.0001, n_components: 1024, random_seed: 1)\ntransformed = transformer.fit_transform(samples)\n\n# Train linear SVM classifier.\nclassifier = Rumale::LinearModel::SVC.new(reg_param: 0.0001)\nclassifier.fit(transformed, labels)\n\n# Save the model.\nFile.open('transformer.dat', 'wb') { |f| f.write(Marshal.dump(transformer)) }\nFile.open('classifier.dat', 'wb') { |f| f.write(Marshal.dump(classifier)) }\n```\n\nClassifying testing data with the trained classifier is the following code.\n\n```ruby\nrequire 'rumale'\n\n# Load the testing dataset.\nsamples, labels = Rumale::Dataset.load_libsvm_file('pendigits.t')\n\n# Load the model.\ntransformer = Marshal.load(File.binread('transformer.dat'))\nclassifier = Marshal.load(File.binread('classifier.dat'))\n\n# Map testing data to RBF kernel feature space.\ntransformed = transformer.transform(samples)\n\n# Classify the testing data and evaluate prediction results.\nputs(\"Accuracy: %.1f%%\" % (100.0 * classifier.score(transformed, labels)))\n\n# Other evaluating approach\n# results = classifier.predict(transformed)\n# evaluator = Rumale::EvaluationMeasure::Accuracy.new\n# puts(\"Accuracy: %.1f%%\" % (100.0 * evaluator.score(results, labels)))\n```\n\nExecution of the above scripts result in the following.\n\n```bash\n$ ruby train.rb\n$ ruby test.rb\nAccuracy: 98.5%\n```\n\n### Example 2. Cross-validation\n\n```ruby\nrequire 'rumale'\n\n# Load dataset.\nsamples, labels = Rumale::Dataset.load_libsvm_file('pendigits')\n\n# Define the estimator to be evaluated.\nlr = Rumale::LinearModel::LogisticRegression.new\n\n# Define the evaluation measure, splitting strategy, and cross validation.\nev = Rumale::EvaluationMeasure::Accuracy.new\nkf = Rumale::ModelSelection::StratifiedKFold.new(n_splits: 5, shuffle: true, random_seed: 1)\ncv = Rumale::ModelSelection::CrossValidation.new(estimator: lr, splitter: kf, evaluator: ev)\n\n# Perform 5-cross validation.\nreport = cv.perform(samples, labels)\n\n# Output result.\nmean_accuracy = report[:test_score].sum \u002F kf.n_splits\nputs \"5-CV mean accuracy: %.1f%%\" % (100.0 * mean_accuracy)\n```\n\nExecution of the above scripts result in the following.\n\n```bash\n$ ruby cross_validation.rb\n5-CV mean accuracy: 95.5%\n```\n\n\n## Speedup\n\n### Numo::Linalg Alternative\nRumale uses [Numo::NArray Alternative](https:\u002F\u002Fgithub.com\u002Fruby-numo\u002Fnumo-narray-alt) for typed arrays.\nLoading the [Numo::Linalg Alterntaive](https:\u002F\u002Fgithub.com\u002Fruby-numo\u002Fnumo-linalg-alt) allows to perform\nmatrix and vector product of Numo::NArray Alternative using OpenBLAS libraries.\nSome machine learning algorithms frequently compute matrix and vector products,\nthe execution speed of such algorithms can be expected to be accelerated.\n\nInstall Numo::Linalg Alternative gem.\n\n```bash\n$ gem install numo-linalg-alt\n```\n\nIn ruby script, just load Numo::Linalg along with Rumale.\n\n```ruby\nrequire 'numo\u002Flinalg'\nrequire 'rumale'\n```\n\n### Parallel\nSeveral estimators in Rumale support parallel processing.\nParallel processing in Rumale is realized by [Parallel](https:\u002F\u002Fgithub.com\u002Fgrosser\u002Fparallel) gem,\nso install and load it.\n\n```bash\n$ gem install parallel\n```\n\n```ruby\nrequire 'parallel'\nrequire 'rumale'\n```\n\nEstimators that support parallel processing have n_jobs parameter.\nWhen -1 is given to n_jobs parameter, all processors are used.\n\n```ruby\nestimator = Rumale::Ensemble::RandomForestClassifier.new(n_jobs: -1, random_seed: 1)\n```\n\n## Related Projects\n\n- [Rumale::SVM](https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Frumale-svm) provides support vector machine algorithms in LIBSVM and LIBLINEAR with Rumale interface.\n- [Rumale::Torch](https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Frumale-torch) provides the learning and inference by the neural network defined in torch.rb with Rumale interface.\n\n## License\n\nThe gem is available as open source under the terms of the [BSD-3-Clause License](https:\u002F\u002Fopensource.org\u002Flicenses\u002FBSD-3-Clause).\n","# Rumale\n\n![Rumale](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fyoshoku_rumale_readme_415e39a3f753.png)\n\n[![构建状态](https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Frumale\u002Factions\u002Fworkflows\u002Fmain.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Frumale\u002Factions\u002Fworkflows\u002Fmain.yml)\n[![Gem版本](https:\u002F\u002Fbadge.fury.io\u002Frb\u002Frumale.svg)](https:\u002F\u002Fbadge.fury.io\u002Frb\u002Frumale)\n[![BSD 3-Clause许可证](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-BSD%203--Clause-orange.svg)](https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Frumale\u002Fblob\u002Fmain\u002FLICENSE.txt)\n[![文档](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fapi-reference-blue.svg)](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002F)\n[![DOI](https:\u002F\u002Fzenodo.org\u002Fbadge\u002F105371532.svg)](https:\u002F\u002Fdoi.org\u002F10.5281\u002Fzenodo.14590520)\n\nRumale（**Ru**by **ma**chine **le**arning）是 Ruby 中的一个机器学习库。\nRumale 提供了与 Python 中的 Scikit-Learn 类似的接口的机器学习算法。\nRumale 支持支持向量机、逻辑回归、岭回归、Lasso 回归、多层感知器、朴素贝叶斯、决策树、梯度提升树、随机森林、K-均值聚类、高斯混合模型、DBSCAN、谱聚类、多维尺度分析、t-SNE、费舍尔判别分析、邻域成分分析、主成分分析、非负矩阵分解等众多算法。\n\n**注意**：自 v2.0.0 版本起，Rumale 使用 [Numo::NArray Alternative](https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Fnumo-narray-alt) 作为依赖项，而非 Numo::NArray。\n\n## 安装\n\n将以下行添加到您的应用程序的 Gemfile 中：\n\n```ruby\ngem 'rumale'\n```\n\n然后执行：\n\n    $ bundle\n\n或者直接安装：\n\n    $ gem install rumale\n\n## 文档\n\n- [Rumale API 文档](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002F)\n\n## 使用\n\n### 示例 1. Pendigits 数据集分类\n\nRumale 提供了加载 libsvm 格式数据集文件的函数。我们首先从 LIBSVM Data 网站下载 pendigits 数据集。\n\n```bash\n$ wget https:\u002F\u002Fwww.csie.ntu.edu.tw\u002F~cjlin\u002Flibsvmtools\u002Fdatasets\u002Fmulticlass\u002Fpendigits\n$ wget https:\u002F\u002Fwww.csie.ntu.edu.tw\u002F~cjlin\u002Flibsvmtools\u002Fdatasets\u002Fmulticlass\u002Fpendigits.t\n```\n\n使用线性 SVM 和 RBF 核特征映射训练分类器的代码如下：\n\n```ruby\nrequire 'rumale'\n\n# 加载训练数据集。\nsamples, labels = Rumale::Dataset.load_libsvm_file('pendigits')\n\n# 将训练数据映射到 RBF 核特征空间。\ntransformer = Rumale::KernelApproximation::RBF.new(gamma: 0.0001, n_components: 1024, random_seed: 1)\ntransformed = transformer.fit_transform(samples)\n\n# 训练线性 SVM 分类器。\nclassifier = Rumale::LinearModel::SVC.new(reg_param: 0.0001)\nclassifier.fit(transformed, labels)\n\n# 保存模型。\nFile.open('transformer.dat', 'wb') { |f| f.write(Marshal.dump(transformer)) }\nFile.open('classifier.dat', 'wb') { |f| f.write(Marshal.dump(classifier)) }\n```\n\n使用训练好的分类器对测试数据进行分类的代码如下：\n\n```ruby\nrequire 'rumale'\n\n# 加载测试数据集。\nsamples, labels = Rumale::Dataset.load_libsvm_file('pendigits.t')\n\n# 加载模型。\ntransformer = Marshal.load(File.binread('transformer.dat'))\nclassifier = Marshal.load(File.binread('classifier.dat'))\n\n# 将测试数据映射到 RBF 核特征空间。\ntransformed = transformer.transform(samples)\n\n# 对测试数据进行分类并评估预测结果。\nputs(\"Accuracy: %.1f%%\" % (100.0 * classifier.score(transformed, labels)))\n\n# 其他评估方法\n# results = classifier.predict(transformed)\n# evaluator = Rumale::EvaluationMeasure::Accuracy.new\n# puts(\"Accuracy: %.1f%%\" % (100.0 * evaluator.score(results, labels)))\n```\n\n运行上述脚本的结果如下：\n\n```bash\n$ ruby train.rb\n$ ruby test.rb\nAccuracy: 98.5%\n```\n\n### 示例 2. 交叉验证\n\n```ruby\nrequire 'rumale'\n\n# 加载数据集。\nsamples, labels = Rumale::Dataset.load_libsvm_file('pendigits')\n\n# 定义要评估的估计器。\nlr = Rumale::LinearModel::LogisticRegression.new\n\n# 定义评估指标、划分策略和交叉验证。\nev = Rumale::EvaluationMeasure::Accuracy.new\nkf = Rumale::ModelSelection::StratifiedKFold.new(n_splits: 5, shuffle: true, random_seed: 1)\ncv = Rumale::ModelSelection::CrossValidation.new(estimator: lr, splitter: kf, evaluator: ev)\n\n# 进行 5 折交叉验证。\nreport = cv.perform(samples, labels)\n\n# 输出结果。\nmean_accuracy = report[:test_score].sum \u002F kf.n_splits\nputs \"5-CV mean accuracy: %.1f%%\" % (100.0 * mean_accuracy)\n```\n\n运行上述脚本的结果如下：\n\n```bash\n$ ruby cross_validation.rb\n5-CV mean accuracy: 95.5%\n```\n\n\n## 加速\n\n### Numo::Linalg Alternative\nRumale 使用 [Numo::NArray Alternative](https:\u002F\u002Fgithub.com\u002Fruby-numo\u002Fnumo-narray-alt) 来处理类型化数组。\n加载 [Numo::Linalg Alterntaive](https:\u002F\u002Fgithub.com\u002Fruby-numo\u002Fnumo-linalg-alt) 后，可以使用 OpenBLAS 库来执行 Numo::NArray Alternative 的矩阵和向量乘法。\n一些机器学习算法经常需要计算矩阵和向量乘法，因此这些算法的执行速度有望得到提升。\n\n安装 Numo::Linalg Alternative gem。\n\n```bash\n$ gem install numo-linalg-alt\n```\n\n在 Ruby 脚本中，只需同时加载 Numo::Linalg 和 Rumale 即可。\n\n```ruby\nrequire 'numo\u002Flinalg'\nrequire 'rumale'\n```\n\n### 并行\nRumale 中的几个估计器支持并行处理。\nRumale 中的并行处理由 [Parallel](https:\u002F\u002Fgithub.com\u002Fgrosser\u002Fparallel) gem 实现，因此需要先安装并加载它。\n\n```bash\n$ gem install parallel\n```\n\n```ruby\nrequire 'parallel'\nrequire 'rumale'\n```\n\n支持并行处理的估计器具有 n_jobs 参数。当将 -1 赋值给 n_jobs 参数时，将使用所有处理器。\n\n```ruby\nestimator = Rumale::Ensemble::RandomForestClassifier.new(n_jobs: -1, random_seed: 1)\n```\n\n## 相关项目\n\n- [Rumale::SVM](https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Frumale-svm) 提供了基于 LIBSVM 和 LIBLINEAR 的支持向量机算法，并通过 Rumale 接口实现。\n- [Rumale::Torch](https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Frumale-torch) 提供了使用 torch.rb 定义的神经网络进行学习和推理的功能，并通过 Rumale 接口实现。\n\n## 许可证\n\n该 gem 以开源形式提供，遵循 [BSD-3-Clause 许可证](https:\u002F\u002Fopensource.org\u002Flicenses\u002FBSD-3-Clause) 的条款。","# Rumale 快速上手指南\n\nRumale 是一个用 Ruby 编写的机器学习库，提供类似于 Python Scikit-Learn 的接口。它支持 SVM、逻辑回归、随机森林、K-Means、PCA 等多种经典算法。\n\n## 环境准备\n\n*   **系统要求**: 支持 Ruby 的运行环境（Linux, macOS, Windows）。\n*   **Ruby 版本**: 建议使用较新的稳定版 Ruby。\n*   **核心依赖**:\n    *   Rumale v2.0.0+ 默认使用 `Numo::NArray Alternative` 作为数值计算后端，无需手动安装旧版 `Numo::NArray`。\n*   **可选加速依赖** (推荐生产环境安装):\n    *   `numo-linalg-alt`: 利用 OpenBLAS 加速矩阵运算。\n    *   `parallel`: 启用多核并行处理（如随机森林等算法）。\n\n## 安装步骤\n\n### 1. 基础安装\n将以下行添加到项目的 `Gemfile` 中：\n\n```ruby\ngem 'rumale'\n```\n\n然后执行：\n\n```bash\n$ bundle\n```\n\n或者直接全局安装：\n\n```bash\n$ gem install rumale\n```\n\n### 2. 性能加速（可选）\n为了获得更快的运行速度和并行处理能力，建议安装以下扩展库：\n\n```bash\n$ gem install numo-linalg-alt\n$ gem install parallel\n```\n\n在代码中引入即可自动生效：\n\n```ruby\nrequire 'numo\u002Flinalg'\nrequire 'parallel'\nrequire 'rumale'\n```\n\n## 基本使用\n\n以下示例演示如何加载数据、训练线性 SVM 分类器并进行预测。\n\n### 1. 准备数据\n首先下载示例数据集（pendigits）：\n\n```bash\n$ wget https:\u002F\u002Fwww.csie.ntu.edu.tw\u002F~cjlin\u002Flibsvmtools\u002Fdatasets\u002Fmulticlass\u002Fpendigits\n$ wget https:\u002F\u002Fwww.csie.ntu.edu.tw\u002F~cjlin\u002Flibsvmtools\u002Fdatasets\u002Fmulticlass\u002Fpendigits.t\n```\n\n### 2. 训练模型\n创建 `train.rb` 文件，包含以下代码：\n\n```ruby\nrequire 'rumale'\n\n# 加载训练数据集 (LIBSVM 格式)\nsamples, labels = Rumale::Dataset.load_libsvm_file('pendigits')\n\n# 将数据映射到 RBF 核特征空间\ntransformer = Rumale::KernelApproximation::RBF.new(gamma: 0.0001, n_components: 1024, random_seed: 1)\ntransformed = transformer.fit_transform(samples)\n\n# 训练线性 SVM 分类器\nclassifier = Rumale::LinearModel::SVC.new(reg_param: 0.0001)\nclassifier.fit(transformed, labels)\n\n# 保存模型\nFile.open('transformer.dat', 'wb') { |f| f.write(Marshal.dump(transformer)) }\nFile.open('classifier.dat', 'wb') { |f| f.write(Marshal.dump(classifier)) }\n```\n\n运行训练脚本：\n\n```bash\n$ ruby train.rb\n```\n\n### 3. 预测与评估\n创建 `test.rb` 文件，加载模型并测试：\n\n```ruby\nrequire 'rumale'\n\n# 加载测试数据集\nsamples, labels = Rumale::Dataset.load_libsvm_file('pendigits.t')\n\n# 加载已保存的模型\ntransformer = Marshal.load(File.binread('transformer.dat'))\nclassifier = Marshal.load(File.binread('classifier.dat'))\n\n# 转换测试数据特征\ntransformed = transformer.transform(samples)\n\n# 预测并输出准确率\nputs(\"Accuracy: %.1f%%\" % (100.0 * classifier.score(transformed, labels)))\n```\n\n运行测试脚本：\n\n```bash\n$ ruby test.rb\n```\n\n预期输出结果类似：\n```text\nAccuracy: 98.5%\n```\n\n### 进阶提示：并行处理\n对于支持并行的算法（如随机森林），可通过设置 `n_jobs` 参数利用多核 CPU：\n\n```ruby\n# 使用所有可用处理器 (-1)\nestimator = Rumale::Ensemble::RandomForestClassifier.new(n_jobs: -1, random_seed: 1)\n```","一家专注于电商风控的 Ruby 技术团队，需要在现有的 Rails 应用中快速集成手写数字识别模型，以自动化审核用户上传的验证码图片。\n\n### 没有 rumale 时\n- **技术栈割裂**：团队必须引入 Python 环境和 Scikit-Learn，导致运维架构复杂化，需在 Ruby 与 Python 服务间通过 HTTP 或消息队列进行繁琐的数据序列化传输。\n- **开发效率低下**：数据科学家需编写额外的胶水代码来桥接两种语言，模型训练、验证与部署的流程被拉长，难以实现敏捷迭代。\n- **算法实现门槛高**：若坚持纯 Ruby 方案，开发者需从零手动推导并编码实现 SVM 或随机森林等复杂算法的数学底层，极易出错且性能难以保证。\n\n### 使用 rumale 后\n- **原生无缝集成**：rumale 提供了与 Scikit-Learn 高度一致的 API 接口，团队可直接在 Ruby 代码中调用线性 SVM、RBF 核映射及随机森林等算法，无需切换运行时环境。\n- **流程大幅简化**：从加载 LibSVM 格式数据、特征变换到模型训练与持久化（Marshal dump），全流程均在单一 Ruby 脚本中完成，显著降低了系统耦合度。\n- **开箱即用的高效算法**：内置了包括降维（t-SNE, PCA）、聚类（K-Means）及分类在内的丰富算法库，让团队能聚焦于业务逻辑而非重复造轮子，轻松复现 98.5% 的高准确率模型。\n\nrumale 让 Ruby 开发者能在不离开舒适区的前提下，享受工业级机器学习的强大能力，彻底打破了语言生态间的壁垒。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fyoshoku_rumale_415e39a3.png","yoshoku","Atsushi Tatsuma","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fyoshoku_d1396d8b.jpg",null,"Japan","yoshoku@outlook.com","https:\u002F\u002Fgithub.com\u002Fyoshoku",[81,85,88,92],{"name":82,"color":83,"percentage":84},"Ruby","#701516",97.7,{"name":86,"color":87,"percentage":32},"C++","#f34b7d",{"name":89,"color":90,"percentage":91},"Shell","#89e051",0.3,{"name":93,"color":94,"percentage":95},"JavaScript","#f1e05a",0,905,35,"2026-04-03T10:28:07","BSD-3-Clause",1,"未说明","不需要 GPU",{"notes":104,"python":105,"dependencies":106},"该工具是基于 Ruby 的机器学习库，非 Python 项目。自 v2.0.0 起，依赖 'numo-narray-alt' 而非 'numo-narray'。若需加速矩阵运算，可安装 'numo-linalg-alt' 以调用 OpenBLAS；若需并行处理（如随机森林），需安装 'parallel' gem 并设置 n_jobs 参数。","不适用 (基于 Ruby)",[107,108,109],"numo-narray-alt","numo-linalg-alt (可选，用于加速)","parallel (可选，用于并行处理)",[16,111,14],"其他",[113,114,115,116,117,118,119],"ruby","machine-learning","data-science","data-analysis","artificial-intelligence","rubyml","ml","2026-03-27T02:49:30.150509","2026-04-07T06:14:03.992828",[123,128,133,138,143],{"id":124,"question_zh":125,"answer_zh":126,"source_url":127},20992,"使用 GradientBoostingRegressor 训练大数据集时遇到 \"stack level too deep\" (SystemStackError) 错误怎么办？","这是一个已修复的问题。维护者已在 Rumale 0.23.1 版本中发布了修复补丁。请升级您的 gem 版本来解决此堆栈溢出错误：\n`gem install rumale -v 0.23.1`\n或者在 Gemfile 中指定版本：\n`gem 'rumale', '~> 0.23.1'`\n如果升级后仍遇到相同错误，请重新报告。","https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Frumale\u002Fissues\u002F28",{"id":129,"question_zh":130,"answer_zh":131,"source_url":132},20993,"Rumale 是否支持 HDBSCAN 或 SNN 聚类算法？如何使用？","是的，Rumale 从 0.13.4 版本开始已实现 HDBSCAN 聚类算法。使用方法如下：\n\n```ruby\nrequire 'rumale'\n\n# 准备数据\nsamples, _ = Rumale::Dataset.make_moons(500, noise: 0.08, random_seed: 1)\noutliers = (Rumale::Utils.rand_uniform([50, 2], Random.new(1)) - 0.3) * 3.5 - Numo::DFloat[0.2, 0.5]\nx = Numo::NArray.vstack([samples, outliers])\n\n# 初始化和拟合模型\nhdbscan = Rumale::Clustering::HDBSCAN.new(min_samples: 5)\ncluster_labels = hdbscan.fit_predict(x)\n```\n\n关于文档，如果 rubydoc.info 解析失败，可以参考官方托管的 Yard 文档：https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FClustering\u002FSNN.html","https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Frumale\u002Fissues\u002F11",{"id":134,"question_zh":135,"answer_zh":136,"source_url":137},20994,"如何在 Rumale 中使用 t-SNE 进行数据降维可视化？它与 scikit-learn 的实现有何不同？","Rumale 0.10.0 及以上版本包含 t-SNE 实现。与 scikit-learn 不同，Rumale 的 t-SNE 使用定点优化（fixed-point optimization），因此不需要设置学习率（learning rate）和动量项（moment term）作为超参数。\n\n使用示例：\n```ruby\ntsne = Rumale::Manifold::TSNE.new(\n  perplexity: 40.0, max_iter: 1000, verbose: true, random_seed: 1)\nlow_samples = tsne.fit_transform(samples)\n```\n\n如果您需要包含 Numo::Linalg 的开发环境，可以使用 rubydata\u002Fminimal-notebook Docker 镜像。","https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Frumale\u002Fissues\u002F7",{"id":139,"question_zh":140,"answer_zh":141,"source_url":142},20995,"Rumale 中是否有类似 scikit-learn `classification_report` 的方法来生成分类评估报告？","有的，从 Rumale 1.8.1 版本开始提供了 `classification_report` 方法。它可以输出每个类别的精确率、召回率、F1 分数和支持度。\n\n使用示例：\n```ruby\nrequire 'rumale'\ny_true = Numo::Int32[0, 1, 1, 2, 2, 2, 0]\ny_pred = Numo::Int32[1, 1, 1, 0, 0, 2, 0]\n\n# 打印格式化报告\nputs Rumale::EvaluationMeasure.classification_report(y_true, y_pred)\n\n# 获取哈希格式结果以便进一步处理\nreport_hash = Rumale::EvaluationMeasure.classification_report(y_true, y_pred, output_hash: true)\n```\n\n输出将包含各类别指标以及宏观平均（macro avg）和加权平均（weighted avg）。","https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Frumale\u002Fissues\u002F22",{"id":144,"question_zh":145,"answer_zh":146,"source_url":147},20996,"为什么使用默认 solver 的 LinearRegression 得到的结果不符合预期（不收敛），而使用 'svd' solver 则正常？","默认的求解器使用随机梯度下降法（SGD），对于某些数据集可能需要更多的迭代次数才能收敛，或者对数据缩放敏感。如果默认设置下结果不佳，建议采取以下措施：\n\n1. **增加最大迭代次数**：显式设置 `max_iter` 参数，例如 `max_iter: 200` 或更高，直到模型收敛。\n2. **推荐使用 SVD solver**：对于线性回归和 Ridge 回归，直接指定 `solver: 'svd'` 通常更高效且结果更稳定，因为它基于解析解而非迭代优化。\n\n代码示例：\n```ruby\n# 推荐方式：使用 SVD\nmodel = Rumale::LinearModel::LinearRegression.new(fit_bias: true, solver: 'svd')\nmodel.fit(x, y)\n\n# 或者调整默认 SGD 的迭代次数\nmodel = Rumale::LinearModel::LinearRegression.new(fit_bias: true, max_iter: 200)\nmodel.fit(x, y)\n```","https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Frumale\u002Fissues\u002F18",[149,154,159,164,169,174,179,184,189,194,199,204,209,214,219,224,229,234,239,244],{"id":150,"version":151,"summary_zh":152,"released_at":153},127034,"v2.1.0","## all\n\n- 放宽 numo-narray 的版本约束，调整为 >= 0.9.10, \u003C 0.11.0。\n\n## rumale-clustering 和 rumale-metric_learning\n\n- 放宽 numo-optimize 的版本约束，调整为 >= 0.2.2, \u003C 1.0.0。\n\n## rumale-tree\n\n- 移除原生扩展构建步骤中的 libstdc++ 加载检查。\n\n## rumale-manifold\n\n- 添加用于经典多维尺度分析的转换器类。\n  - ClassicalMDS","2026-02-08T10:23:50",{"id":155,"version":156,"summary_zh":157,"released_at":158},127035,"v2.0.2","## all\n\n- 将 numo-narray-alt 的所需版本设置为 0.9.10 或更高。\n- 将 require 语句更改为显式加载 numo-narray-alt。\n\n## rumale-clustering 和 rumale-metric_learning\n\n- 将 numo-optimize 的所需版本设置为 0.2.2 或更高。","2025-11-20T00:50:21",{"id":160,"version":161,"summary_zh":162,"released_at":163},127036,"v2.0.1","## rumale-naive_bayes\n- 修复在 MultinomialNB 中处理大规模样本时出现的 SystemStackError：[#51](https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Frumale\u002Fpull\u002F51)\n\n## 其他\n- 重构 GitHub Actions 工作流，以缩短执行时间。\n","2025-10-22T10:41:24",{"id":165,"version":166,"summary_zh":167,"released_at":168},127037,"v2.0.0","## 全部\n\n- 将运行时依赖从 numo-narray 更改为 [numo-narray-alt](https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Fnumo-narray-alt)。\n\n## rumale-linear_model\n\n- 将运行时依赖从 lbfgsb.rb 更改为 [numo-optimize](https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Fnumo-optimize)。\n\n## rumale-metric_learning\n\n- 将运行时依赖从 lbfgsb.rb 更改为 [numo-optimize](https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Fnumo-optimize)。\n\nRumale 的运行时依赖库 [Numo::NArray](https:\u002F\u002Frubygems.org\u002Fgems\u002Fnumo-narray) 已经三年没有发布新版本了。为了 Rumale 的后续开发，我决定对 Numo::NArray 进行分叉，继续其开发工作，包括应用漏洞修复等。除了更新运行时依赖之外，本次发布没有其他重大变更。此外，如果您在 Rumale 中使用 Numo::Linalg，建议改用 [numo-linalg-alt](https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Fnumo-linalg-alt)。","2025-10-07T13:49:29",{"id":170,"version":171,"summary_zh":172,"released_at":173},127038,"v1.0.0","## rumale-core\n- 将 csv gem 添加到 Ruby 3.4 的运行时依赖中。\n\n## rumale-ensemble\n- 添加基于可变随机树的分类器和回归器类。\n  - [VRTreesClassifier](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FEnsemble\u002FVRTreesClassifier.html)\n  - [VRTreesRegressor](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FEnsemble\u002FVRTreesRegressor.html)\n\n## 其他\n- 没有变更，或仅使用 RuboCop 进行了少量修改。\n\n**注**：\n本次更新中的上述变更通常会发布为 0.30.0 版本。然而，考虑到超过五年的漫长开发周期，此次发布被定为 1.0.0 版本。","2025-01-03T00:34:38",{"id":175,"version":176,"summary_zh":177,"released_at":178},127039,"v0.29.0","## rumale-decomposition\n- 添加稀疏主成分分析的转换器类。\n  - [SparsePCA](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FDecomposition\u002FSparsePCA.html)\n\n## rumale-manifold\n- 添加局部切空间对齐的转换器类。\n  - [LocalTangentSpaceAlignment](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FManifold\u002FLocalTangentSpaceAlignment.html)\n\n## 其他\n- 没有变化，或配置文件有少量修改。","2024-03-30T01:39:11",{"id":180,"version":181,"summary_zh":182,"released_at":183},127040,"v0.28.1","## rumale-core\n- 修复 euclidean_distance 和 squared_error 方法中 y 参数的 nil 检查：[#45](https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Frumale\u002Fpull\u002F45) 和 [4eb1727](https:\u002F\u002Fgithub.com\u002Fyoshoku\u002Frumale\u002Fcommit\u002F4eb1727fadb05eff8ba94bd067693b4b25f141d4)\n\n## rumale-manifold\n- 添加 Hessian 特征映射的转换器类。\n  - HessianEigenmaps\n\n## 其他\n- 无变更，或仅使用 RuboCop 进行了少量修改。","2023-12-24T07:23:08",{"id":185,"version":186,"summary_zh":187,"released_at":188},127041,"v0.28.0","## rumale-tree\n**重大变更**\n- 使用 C++ 重写原生扩展代码。\n- 使用原生扩展重新实现 `DecisionTreeRegressor` 中的私有方法 `stop_growing?`。\n\n## rumae-neural_network\n- 添加径向基函数（RBF）网络的分类器和回归器类。\n  - [RBFClassifier](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FNeuralNetwork\u002FRBFClassifier.html)\n  - [RBFRegressor](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FNeuralNetwork\u002FRBFRegressor.html)\n- 添加随机向量功能链接（RVFL）网络的分类器和回归器类。\n  - [RVFLClassifier](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FNeuralNetwork\u002FRVFLClassifier.html)\n  - [RVFLRegressor](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FNeuralNetwork\u002FRVFLRegressor.html)\n\n## 其他\n- 无变更，仅对配置文件进行了少量修改，或使用 RuboCop 进行了小幅重构。","2023-11-12T00:57:47",{"id":190,"version":191,"summary_zh":192,"released_at":193},127042,"v0.27.0","## rumale-linear_model\n- 为 [SGDClassifier](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FLinearModel\u002FSGDClassifier.html) 和 [SGDRegressor](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FLinearModel\u002FSGDRegressor.html) 添加 `partial_fit` 方法。\n  - 该方法执行一轮随机梯度下降。它仅支持二分类标签和单个目标变量。\n\n## rumale-tree\n- 移除原生扩展中不必要的数组生成操作。\n\n## 其他\n- 无变更，或使用 RuboCop 进行了少量代码调整。","2023-08-26T15:22:46",{"id":195,"version":196,"summary_zh":197,"released_at":198},127043,"v0.26.0","## rumale-clustering\n- 添加基于均值漂移方法的聚类分析类。\n  - [MeanShift](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FClustering\u002FMeanShift.html)\n\n## rumale-manifold\n- 添加局部线性嵌入和拉普拉斯特征映射的转换器类。\n  - [LocallyLinearEmbedding](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FManifold\u002FLocallyLinearEmbedding.html)\n  - [LaplacianEigenmaps](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FManifold\u002FLaplacianEigenmaps.html)\n\n## rumale-metric_learning\n- 添加局部费舍尔判别分析的转换器类。\n  - [LocalFisherDiscriminantAnalysis](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FMetricLearning\u002FLocalFisherDiscriminantAnalysis.html)\n\n## 其他\n- 没有变化，或仅对配置文件进行了轻微修改。","2023-02-19T12:42:06",{"id":200,"version":201,"summary_zh":202,"released_at":203},127044,"v0.25.0","## rumale-linear_model\r\n**Breaking change**\r\n- Add new SGDClassfier and SGDRegressor by extracting stochastic gradient descent solver from each linear model.\r\n- Change the optimization method of ElasticNet and Lasso to use the coordinate descent algorithm.\r\n- Change the optimization method of SVC and SVR to use the L-BFGS method.\r\n- Change the loss function of SVC to the squared hinge loss.\r\n- Change the loss function of SVR to the squared epsilon-insensitive loss.\r\n- Change not to use random vector for initialization of weights.\r\n  - From the above changes, keyword arguments such as learning_rate, decay, momentum, batch_size,\r\n    and random_seed for LinearModel estimators have been removed.\r\n- Fix the column and row vectors of weight matrix are reversed in LinearRegression, Ridge, and NNLS.\r\n\r\n## rumale-decomposition\r\n- Fix missing require method to load Rumale::Utils in PCA class.\r\nIt is needed to initialize the principal components when optimizing with fixed-point algorithm.\r\n\r\n## rumale-evaluation_measure\r\n- Apply automatic correction for Style\u002FZeroLengthPredicate of RuboCop to ROCAUC class.\r\n\r\n## others\r\n- No changes, or only modifications in test code or configuration.","2023-01-18T14:56:06",{"id":205,"version":206,"summary_zh":207,"released_at":208},127045,"v0.24.0","Rumale project is rebooted:\r\n- Divided into gems for each machine learning algorithm, with Rumale as the meta-gem.\r\n- Changed the license of Rumale to the 3-Caluse BSD License.","2022-12-31T15:38:59",{"id":210,"version":211,"summary_zh":212,"released_at":213},127046,"v0.23.2","- Refactored into modern style code and config with linter.\r\n\r\nRumale project will be rebooted on version 0.24.0. This version is probably the last release of the series starting with version 0.8.0.","2022-05-17T14:44:41",{"id":215,"version":216,"summary_zh":217,"released_at":218},127047,"v0.23.1","- Fixed all estimators to return inference results in a contiguous narray, not a view.\r\n- To avoid SystemStackError, fixed to use until statement instead of recursive call on apply methods of tree estimators.","2021-06-27T04:06:02",{"id":220,"version":221,"summary_zh":222,"released_at":223},127048,"v0.23.0","- Changed automalically selected solver from sgd to lbfgs in [LinearRegression](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FLinearModel\u002FLinearRegression.html) and [Ridge](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FLinearModel\u002FRidge.html).\r\n  ```ruby\r\n  require 'rumale'\r\n\r\n  reg = Rumale::LinearModel::Ridge.new(solver: 'auto')\r\n  pp reg.params[:solver]\r\n  # > \"lbfgs\"\r\n\r\n  require 'numo\u002Flinalg\u002Fautoloader'\r\n\r\n  reg = Rumale::LinearModel::Ridge.new(solver: 'auto')\r\n  pp reg.params[:solver]\r\n  # > \"svd\"\r\n  ```","2021-04-04T02:51:31",{"id":225,"version":226,"summary_zh":227,"released_at":228},127049,"v0.22.5","- Added a new transformer that calculates the kernel matrix of given samples.\r\n\r\n  ```ruby\r\n  regressor = Rumale::Pipeline::Pipeline.new(\r\n    steps: {\r\n      ker: Rumale::Preprocessing::KernelCalculator.new(kernel: 'rbf', gamma: 0.5),\r\n      krr: Rumale::KernelMachine::KernelRidge.new(reg_param: 1.0)\r\n    }\r\n  )\r\n  regressor.fit(x_train, y_train)\r\n  res = regressor.predict(x_test)\r\n  ```\r\n\r\n- Added a new classifier based on kenelized ridge regression.\r\n\r\n  ```ruby\r\n  classifier = Rumale::KernelMachine::KernelRidgeClassifier.new(reg_param: 1.0)\r\n  ```\r\n\r\n- Nystroem now supports linear, polynomial, and sigmoid kernel functions.\r\n\r\n  ```ruby\r\n  nystroem = Rumale::KernelApproximation::Nystroem.new(\r\n               kernel: 'poly', gamma: 1, degree: 3, coef: 8, n_components: 256\r\n             )\r\n  ```\r\n\r\n- load_libsvm_file has a new parameter `n_features` for specifying the number of features.\r\n\r\n  ```ruby\r\n  x, y = Rumale::Dataset.load_libsvm_file('mnist.t', n_features: 780)\r\n  # p x.shape\r\n  # => [10000, 780]\r\n  ```","2021-03-14T02:17:17",{"id":230,"version":231,"summary_zh":232,"released_at":233},127050,"v0.22.4","- Added classifier and regressor classes with voting-based ensemble method that combines estimators using majority voting.\r\n  - [VotingClassifier](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FEnsemble\u002FVotingClassifier.html)\r\n  - [VotingRegressor](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FEnsemble\u002FVotingRegressor.html)\r\n\r\n```ruby\r\nrequire 'numo\u002Fopenblas'\r\nrequire 'parallel'\r\nrequire 'rumale'\r\n\r\n# ... Loading dataset\r\n\r\nclf = Rumale::Ensemble::VotingClassifier.new(\r\n  estimators: {\r\n    log: Rumale::LinearModel::LogisticRegression.new(random_seed: 1),\r\n    rnd: Rumale::Ensemble::RandomForestClassifier.new(n_jobs: -1, random_seed: 1),\r\n    ext: Rumale::Ensemble::ExtraTreesClassifier.new(n_jobs: -1, random_seed: 1)\r\n  },\r\n  weights: {\r\n    log: 0.5,\r\n    rnd: 0.3,\r\n    ext: 0.2\r\n  },\r\n  voting: 'soft'\r\n)\r\n\r\nclf.fit(x, y)\r\n```\r\n","2021-02-22T23:44:35",{"id":235,"version":236,"summary_zh":237,"released_at":238},127051,"v0.22.3","- Added regressor class for non-negative least squares ([NNLS](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FLinearModel\u002FNNLS.html)) method. NNLS is a linear regression method that constrains non-negativeness to the coefficients.\r\n\r\n```ruby\r\nrequire 'rumale'\r\n\r\nrng = Random.new(1)\r\nn_samples = 200\r\nn_features = 100\r\n\r\n# Prepare example data set.\r\nx = Rumale::Utils.rand_normal([n_samples, n_features], rng)\r\n\r\ncoef = Rumale::Utils.rand_normal([n_features, 1], rng)\r\ncoef[coef.lt(0)] = 0.0 # Non-negative coefficients\r\n\r\nnoise = Rumale::Utils.rand_normal([n_samples, 1], rng)\r\n\r\ny = x.dot(coef) + noise\r\n\r\n# Split data set with holdout method.\r\nx_train, x_test, y_train, y_test = Rumale::ModelSelection.train_test_split(x, y, test_size: 0.4, random_seed: 1)\r\n\r\n# Fit non-negative least squares.\r\nnnls = Rumale::LinearModel::NNLS.new(reg_param: 1e-4, random_seed: 1).fit(x_train, y_train)\r\nputs(format(\"NNLS R2-Score: %.4f\", nnls.score(x_test, y_test)))\r\n\r\n# Fit ridge regression.\r\nridge = Rumale::LinearModel::Ridge.new(solver: 'lbfgs', reg_param: 1e-4, random_seed: 1).fit(x_train, y_train)\r\nputs(format(\"Ridge R2-Score: %.4f\", ridge.score(x_test, y_test)))\r\n```\r\n\r\n```sh\r\n$ ruby nnls.rb\r\nNNLS R2-Score: 0.9478\r\nRidge R2-Score: 0.8602\r\n```","2021-01-23T05:34:01",{"id":240,"version":241,"summary_zh":242,"released_at":243},127052,"v0.22.2","- Added classifier and regressor classes for stacked generalization that is a method for combining estimators to improve prediction accuracy: \r\n  - [StackingClassifier](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FEnsemble\u002FStackingClassifier.html)\r\n  - [StackingRegressor](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FEnsemble\u002FStackingRegressor.html)\r\n\r\n```ruby\r\nrequire 'numo\u002Fopenblas'\r\nrequire 'parallel'\r\nrequire 'rumale'\r\n\r\n# ... Loading dataset\r\n\r\nclf = Rumale::Ensemble::StackingClassifier.new(\r\n  estimators: {\r\n    rnd: Rumale::Ensemble::RandomForestClassifier.new(max_features: 4, n_jobs: -1, random_seed: 1),\r\n    ext: Rumale::Ensemble::ExtraTreesClassifier.new(max_features: 4, n_jobs: -1, random_seed: 1),\r\n    grd: Rumale::Ensemble::GradientBoostingClassifier.new(n_jobs: -1, random_seed: 1),\r\n    rdg: Rumale::LinearModel::LogisticRegression.new\r\n  },\r\n  meta_estimator: Rumale::LinearModel::LogisticRegression.new(reg_param: 1e2),\r\n  random_seed: 1\r\n)\r\n\r\nclf.fit(x, y)\r\n```","2021-01-10T04:52:58",{"id":245,"version":246,"summary_zh":247,"released_at":248},127053,"v0.22.1","- Add transfomer class for [MLKR](https:\u002F\u002Fyoshoku.github.io\u002Frumale\u002Fdoc\u002FRumale\u002FMetricLearning\u002FMLKR.html) (Metric Learning for Kernel Regression) that performs transformation\u002Fprojection along to the target variables. The following are examples of transforming toy example data using PCA and MLKR.\r\n\r\n```ruby\r\nrequire 'rumale'\r\n\r\ndef make_regression(n_samples: 500, n_features: 10, n_informative: 4, n_targets: 1)\r\n  n_informative = [n_features, n_informative].min\r\n\r\n  rng = Random.new(42)\r\n  x = Rumale::Utils.rand_normal([n_samples, n_features], rng)\r\n\r\n  ground_truth = Numo::DFloat.zeros(n_features, n_targets)\r\n  ground_truth[0...n_informative, true] = 100 * Rumale::Utils.rand_uniform([n_informative, n_targets], rng)\r\n  y = x.dot(ground_truth)\r\n  y = y.flatten\r\n\r\n  rand_ids = Array(0...n_samples).shuffle(random: rng)\r\n  x = x[rand_ids, true].dup\r\n  y = y[rand_ids].dup\r\n\r\n  [x, y]\r\nend\r\n\r\nx, y = make_regression\r\n\r\npca = Rumale::Decomposition::PCA.new(n_components: 10)\r\nz_pca = pca.fit_transform(x, y)\r\nmlkr = Rumale::MetricLearning::MLKR.new(n_components: nil, init: 'pca')\r\nz_mlkr = mlkr.fit_transform(x, y)\r\n\r\n# After that, these results are visualized by multidimensional scaling.\r\n```\r\n\r\nPCA: \r\n![pca](https:\u002F\u002Fuser-images.githubusercontent.com\u002F5562409\u002F101233760-858a6f00-36fd-11eb-9a84-4775c74385ae.png)\r\n\r\nMLKR:\r\n![mlkr](https:\u002F\u002Fuser-images.githubusercontent.com\u002F5562409\u002F101234023-74daf880-36ff-11eb-972b-c0a55d44f682.png)\r\n\r\n","2020-12-05T04:42:00"]