Skills AdvancedMLClassificationSkill
自动化生成工业级机器学习分类算法代码、调用算法做预测、输出准确率对比和可视化结果,支持新手友好的结果解读。
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/bamboo9805/advanced-ml-classification-skill" ~/.claude/skills/openclaw-skills-advancedmlclassificationskill && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/bamboo9805/advanced-ml-classification-skill" ~/.openclaw/skills/openclaw-skills-advancedmlclassificationskill && rm -rf "$T"
manifest:
skills/bamboo9805/advanced-ml-classification-skill/SKILL.mdsource content
AdvancedMLClassificationSkill
输入参数
(必填)CSV 数据集路径data_path: str
(必填)预测目标列名target_col: str
(可选)默认algorithms: list[str][ "逻辑回归", "决策树", "随机森林", "XGBoost", "LightGBM" ]
(可选)默认test_size: float0.2
(可选)默认random_state: int42
输出结构
accuracy_results: dict[str, float|None]interpretation: strgenerated_codes: dict[str, str]visualization_data: dict
关键流程
- 自动预处理(缺失值、类别编码、数值标准化)
- 按算法生成训练代码(优先
,失败回退本地模板)code-davinci-002 - 执行算法代码并统计准确率(失败时返回具体错误)
- 可选交叉验证(
/StratifiedKFold
/KFold
)RepeatedStratifiedKFold - 可选参数搜索(
/GridSearchCV
)RandomizedSearchCV - 生成置换特征重要性排序(默认对最佳算法)
- 生成新手友好中文解读(优先
)gpt-3.5-turbo - 输出可视化数据(柱状图/折线图)
运行示例
cd /Users/bamboo/skills/advanced-ml-classification-skill/scripts python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt python generate_complex_demo.py python advanced_ml_skill.py --data-path ./demo_complex.csv --target-col target_label --enable-cv --enable-search streamlit run app.py