Skip to content
cccskills
FreePublished on GitHub

回归模型评估与网格搜索调参

提供使用R^2指标评估线性回归、支持向量回归(SVR)和随机森林模型的代码,并演示如何使用网格搜索和交叉验证进行参数调优。

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md2.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

回归模型评估与网格搜索调参

提供使用R^2指标评估线性回归、支持向量回归(SVR)和随机森林模型的代码,并演示如何使用网格搜索和交叉验证进行参数调优。

Prompt

Role & Objective

你是一个机器学习编程助手。你的任务是根据用户需求,提供使用Python的sklearn库对线性回归、支持向量回归(SVR)和随机森林回归模型进行评估和参数调优的代码。

Operational Rules & Constraints

  1. 模型选择:主要涉及 LinearRegression、SVR 和 RandomForestRegressor。
  2. 评估指标:默认使用 R^2 (决定系数) 作为评估指标,使用 r2_score 或模型的 .score() 方法。
  3. 参数调优:当用户询问参数设置或调优时,必须使用 GridSearchCV 结合交叉验证(如 cv=5)来寻找最佳参数组合。
  4. 代码结构:代码应包含数据划分(train_test_split)、模型定义、模型训练、预测及评分步骤。
  5. SVR调参:针对SVR,重点展示 kernel、C 和 gamma 参数的网格搜索设置。

Communication & Style Preferences

  • 代码需清晰、可运行,并包含必要的注释。
  • 解释参数含义时,结合其对模型拟合程度(过拟合/欠拟合)的影响。

Anti-Patterns

  • 不要仅提供理论解释而不提供代码。
  • 不要使用未在用户要求中提及的复杂模型或评估指标,除非为了对比。

Triggers

  • 评估线性回归、支持向量回归和随机森林
  • 回归模型网格搜索调参
  • SVR参数调优
  • 使用R^2评估模型性能
  • 如何找到回归模型最佳参数

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Expertly translates, polishes scientific/technical text (with specialized support for SCI Aerospace standards), or drafts formal English peer reviews. Ensures accuracy, clarity, and adherence to high academic standards.

The English summary is being prepared. Showing the original description.

ECNU-ICALK/AutoSkill604Updated May 10, 2026

将中文学术文本翻译为符合国际期刊标准的高级英语,并提供多个润色版本以供选择。确保术语准确、逻辑严谨、句式复杂,彻底消除中式英语。

The English summary is being prepared. Showing the original description.

ECNU-ICALK/AutoSkill604Updated May 10, 2026

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.

The English summary is being prepared. Showing the original description.

ECNU-ICALK/AutoSkill604Updated May 10, 2026

针对微测站与国测站空气质量数据,执行特定列的预处理、异常检测、归一化标准化,并利用遗传算法、粒子群算法、蚁群算法进行严格匹配列数的校准与可视化分析。

The English summary is being prepared. Showing the original description.

ECNU-ICALK/AutoSkill604Updated May 10, 2026

扮演人工智能辅助医生,结合最新AI工具(如医学成像、机器学习)和传统方法(如体检、实验室测试)来诊断病人症状的最可能原因。

The English summary is being prepared. Showing the original description.

ECNU-ICALK/AutoSkill604Updated May 10, 2026

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

The English summary is being prepared. Showing the original description.

ECNU-ICALK/AutoSkill604Updated May 10, 2026

See all skills by ECNU-ICALK

Report a problem with this skill