Machine Learning Research Expert logo

Machine Learning Research Expert

Community
ptreezh
machine-learning-research-expert

Machine Learning Research expert. Provides algorithm selection, model training, hyperparameter tuning, performance evaluation, and ML research methodology. Suitable for AI research, predictive modeling, and machine learning implementation.

Overview

Publisherptreezh
Repositorysscisubagent-skills
Skill namemachine-learning-research-expert
Stars
45
Forks
7
Bundled files
5
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ptreezh on GitHub. Read the source before you install it.

Installation

Install the Machine Learning Research Expert AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ptreezh/sscisubagent-skills/tree/main/skills/machine-learning-research-expert
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ptreezh/sscisubagent-skills.git /tmp/sscisubagent-skills
mkdir -p .claude/skills
cp -r /tmp/sscisubagent-skills/skills/machine-learning-research-expert .claude/skills/machine-learning-research-expert
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Machine Learning Research Expert in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Machine Learning Research Expert on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Machine Learning Research Expert is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

-------|------|----------| | 二分类 | 0/1预测 | Logistic、SVM、XGBoost | | 多分类 | 多类别预测 | RF、XGBoost、神经网络 | | 回归 | 连续值预测 | 线性回归、XGBoost、神经网络 | | 排序 | 顺序预测 | LambdaMART、RankNet |

无监督学习

问题类型目标推荐模型
聚类分组发现K-Means、DBSCAN、GMM
降维特征压缩PCA、t-SNE、UMAP
异常检测离群点识别Isolation Forest、LOF

特征工程

特征类型

数值特征
├── 连续型: 年龄、收入
└── 离散型: 计数、等级

类别特征
├── 标称型: 性别、地区
└── 有序型: 教育程度

文本特征
├── 词频: TF-IDF
└── 语义: Word2Vec、BERT

时间特征
├── 周期性: 季节、工作日
└── 趋势性: 时间戳、滞后

特征转换

转换方法适用场景公式
标准化正态分布(x-μ)/σ
归一化有界范围(x-min)/(max-min)
对数变换长尾分布log(x+1)
Box-Cox非正态(x^λ-1)/λ

特征选择

过滤法
├── 方差阈值: 移除低方差特征
├── 相关性: 移除高相关特征
└── 互信息: 选择高信息量特征

包装法
├── 前向选择: 逐步添加
├── 后向消除: 逐步移除
└── 递归消除: RFE

嵌入法
├── L1正则: LASSO稀疏
├── 树模型: 特征重要性
└── 深度学习: 自动学习

模型训练

训练流程

python
from sklearn.model_selection import train_test_split, cross_val_score
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import classification_report

# 数据分割
X_train, X_test, y_train, y_test = train_test_split(
    X, y, test_size=0.2, stratify=y, random_state=42
)

# 交叉验证
model = RandomForestClassifier(n_estimators=100)
cv_scores = cross_val_score(model, X_train, y_train, cv=5)

# 模型训练
model.fit(X_train, y_train)

# 模型评估
y_pred = model.predict(X_test)
print(classification_report(y_test, y_pred))

超参数优化

方法优点缺点
网格搜索全面计算量大
随机搜索高效可能遗漏
贝叶斯优化智能搜索需要工具

贝叶斯优化示例

python
from skopt import BayesSearchCV

param_space = {
    'n_estimators': (50, 500),
    'max_depth': (3, 20),
    'min_samples_split': (2, 20),
}

opt = BayesSearchCV(
    RandomForestClassifier(),
    param_space,
    n_iter=50,
    cv=5,
    n_jobs=-1
)
opt.fit(X_train, y_train)

模型评估

分类指标

混淆矩阵:
              预测正类  预测负类
实际正类        TP        FN
实际负类        FP        TN

准确率 = (TP+TN)/(TP+TN+FP+FN)
精确率 = TP/(TP+FP)  # 预测正类的准确性
召回率 = TP/(TP+FN)  # 实际正类的覆盖率
F1 = 2×P×R/(P+R)     # 精确率和召回率的调和平均
AUC-ROC = 曲线下面积  # 分类器整体性能

回归指标

指标公式含义
MAEΣy-ŷ
MSEΣ(y-ŷ)²/n均方误差
RMSE√MSE均方根误差
R²1-SS_res/SS_tot解释方差比例

交叉验证

K折交叉验证:
┌───────────────────────┐
│ 测 │ 训 │ 训 │ 训 │ 训 │ → Fold 1
├───────────────────────┤
│ 训 │ 测 │ 训 │ 训 │ 训 │ → Fold 2
├───────────────────────┤
│ 训 │ 训 │ 测 │ 训 │ 训 │ → Fold 3
├───────────────────────┤
│ 训 │ 训 │ 训 │ 测 │ 训 │ → Fold 4
├───────────────────────┤
│ 训 │ 训 │ 训 │ 训 │ 测 │ → Fold 5
└───────────────────────┘

平均性能 = Σ(Fold_i)/K

模型解释

特征重要性

树模型特征重要性:
- 基于分裂次数
- 基于信息增益
- 基于排列重要性

线性模型:
- 系数绝对值
- 标准化系数

SHAP值

python
import shap

# 计算SHAP值
explainer = shap.TreeExplainer(model)
shap_values = explainer.shap_values(X_test)

# 全局解释
shap.summary_plot(shap_values, X_test)

# 局部解释
shap.force_plot(explainer.expected_value, 
                shap_values[0], 
                X_test.iloc[0])

SHAP解释图

特征重要性排序:
↑ 特征A  ████████████████  +0.35
│ 特征B  ████████████      +0.28
│ 特征C  ████████          +0.15
│ 特征D  ████              +0.08
↓ 特征E  ██                +0.04

红色: 高特征值  蓝色: 低特征值

常见问题处理

类别不平衡

方法描述
过采样SMOTE、ADASYN
欠采样RandomUnderSampler
类别权重class_weight='balanced'
阈值调整调整分类阈值

过拟合

症状: 训练集表现好,测试集表现差

解决方案:
├── 增加数据量
├── 正则化(L1/L2)
├── 交叉验证
├── 早停(Early Stopping)
├── Dropout(神经网络)
└── 集成方法

数据泄露

常见泄露来源:
├── 目标变量泄漏: 使用未来信息
├── 特征泄露: 包含目标信息
├── 时间泄露: 时间序列分割不当
└── 预处理泄露: 使用全部数据做转换

预防措施:
├── 先分割再预处理
├── 使用Pipeline
├── 检查特征与目标的相关性
└── 时间序列使用时间分割

使用示例

用户: 构建一个预测客户流失的模型

AI: 我将执行完整的ML工作流程:

## 数据概况
- 样本量: 10,000
- 特征数: 25
- 目标分布: 流失20%, 未流失80%

## 特征工程
- 数值特征: 标准化
- 类别特征: One-Hot编码
- 新特征: 客户生命周期、消费频次

## 模型比较(5折交叉验证)
| 模型 | AUC | F1 |
|------|-----|-----|
| Logistic | 0.78 | 0.52 |
| Random Forest | 0.85 | 0.63 |
| XGBoost | 0.87 | 0.66 |
| LightGBM | 0.86 | 0.65 |

## 最优模型: XGBoost
- 测试集AUC: 0.86
- 测试集F1: 0.64

## Top 5 特征重要性
1. 最近活跃天数: 0.28
2. 月消费金额: 0.18
3. 投诉次数: 0.12
4. 会员等级: 0.09
5. 使用时长: 0.08

🖥️ Python 工具

工具链

#工具名称功能描述
1—本技能暂无专用Python工具

CLI用法

bash
# 机器学习研究主要通过AI对话辅助和scikit-learn等库实现
python -c "from sklearn.ensemble import RandomForestClassifier; print('sklearn ready')"

🚫 绝对禁止原则

使用前必读:以下原则是不可逾越的红线,违反将导致研究结论无效。

  1. 禁止跳过研究伦理审查 — 未获IRB批准的实证研究不得用于发表
  2. 禁止捏造或篡改数据 — 任何形式的数据造假均违反学术伦理
  3. 禁止忽视研究局限性 — 必须在论文中诚实报告研究局限
  4. 禁止剽窃他人研究成果 — 必须正确引用所有参考来源
  5. 禁止选择性报告结果 — 阴性结果同样需要报告
  6. 禁止使用不匹配的分析方法 — 必须根据研究问题选择合适方法

参考文献

  1. Hastie, T., Tibshirani, R., & Friedman, J. (2009). The Elements of Statistical Learning. 2nd ed.
  2. Goodfellow, I., Bengio, Y., & Courville, A. (2016). Deep Learning.
  3. Molnar, C. (2022). Interpretable Machine Learning.
  4. Zheng, A., & Casari, A. (2018). Feature Engineering for Machine Learning.

技能版本: 5.0.0
方法论标准: Hastie et al. (2009)
创建时间: 2026-03-15

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Machine Learning Research Expert AI skill do?

Machine Learning Research expert. Provides algorithm selection, model training, hyperparameter tuning, performance evaluation, and ML research methodology. Suitable for AI research, predictive modeling, and machine learning implementation.

Why use Machine Learning Research Expert on TypingMind?

Because you install it once and use it with any model. Machine Learning Research Expert is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Machine Learning Research Expert in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ptreezh/sscisubagent-skills/tree/main/skills/machine-learning-research-expert. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Machine Learning Research Expert?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Machine Learning Research Expert?

As many as you like. As long as a model supports skills, you can use Machine Learning Research Expert with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Machine Learning Research Expert AI skill free?

Yes. It is published on GitHub by ptreezh under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇