Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/hongdotien10-hash-4e38b5
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/mrite-preprocess
What's inside
- Skill name
数据预处理- Description
- 数学建模数据预处理,包含缺失值处理、异常值检测、标准化/归一化、特征工程
- License
- MIT
- Instructions
- 224 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- name: only lowercase letters, digits and single hyphens allowed
- name: "数据预处理" does not match folder "mrite-preprocess"
Files (1)
- SKILL.md
SKILL.md (first lines)
# 数据预处理
## 目的
对原始数据进行系统化预处理,为建模提供清洁规整的输入数据。
## 预处理流程
### Step 1: 数据读取与理解
```python
import pandas as pd
import numpy as np
import chardet
# 自动检测编码(对CSV文件)
with open('文件.csv', 'rb') as f:
result = chardet.detect(f.read())
print(f"检测编码: {result['encoding']}")
# 读取数据
df = pd.read_excel('数据/data.xlsx', sheet_name='Sheet1')
# 基础信息
print(f"数据规模: {df.shape}")
print(f"列名: {list(df.columns)}")
print(f"数据类型:\n{df.dtypes}")
print(f"缺失值:\n{df.isnull().sum()}")
print(f"描述统计:\n{df.describe()}")
```
### Step 2: 数据清洗
#### 2.1 缺失值处理
```python
# 统计缺失情况
missing_ratio = df.isnull().sum() / len(df)
print("缺失比例:\n", missing_ratio)
# 策略选择
for col in df.columns:
ratio = df[col].isnull().sum() / len(df)
if ratio == 0:
continue
elif ratio < 0.05: # <5%: 直接删除缺失行
df = df.dropna(subset=[col])
print(f" [{col}] 缺失{ratio:.1%},删除缺失行")
elif ratio < 0.20: # 5%-20%: 插补
if df[col].dtype in ['float64', 'int64']:
df[col] = df[col].fillna(df[col].median()) # 数值列用中位数
else:
df[col] = df[col].fillna(df[col].mode()[0]) # 分类列用众数
print(f" [{col}] 缺失{ratio:.1%},已插补")
else: # >20%: 考虑删除该列
print(f" ⚠ [{col}] 缺失{ratio:.1%},比例过高,建议删除或特殊处理")
```
#### 2.2 异常值检测
```python
def detect_outliers(df, method='iqr'):
"""检测异常值"""
outliers = {}
for col in df.select_dtypes(include=[np.number]).columns:
if method == 'iqr':
Q1 = df[col].quantile(0.25)
Q3 = df[col].quantile(0.75)
IQR = Q3 - Q1
lower = Q1 - 1.5 * IQR
upper = Q3 + 1.5 * IQR
mask = (df[col] < lower) | (df[col] > upper)
elif method == 'zscore':
from scipy import stats
z = np.abs(stats.zscore(df[col].dropna()))
mask = pd.Series(z > 3, index=df[col].dropna().index)
if mask.sum() > 0:
outliers[col] = {
'count': mask.sum(),
'ratio': mask.sum() / len(df),
'indices': df[mask].index.tolist()
}
return outliers
outliers = detect_outliers(df, method='iqr')
for col, info in outliers.items():
print(f" [{col}] 异常值 {info['count']} 个 ({info['ratio']:.1%})")
# 处理异常值:使用中位数替换
for col in outliers:
median = df[col].median()
df.loc[df.index.isin(outliers[col]['indices']), col] = median
```
#### 2.3 重复值处理
```python
duplicates = df.duplicated().sum()
print(f"重复行: {duplicates}")
if duplicates > 0:
df = df.drop_duplicates()
```
### Step 3: 标准化/归一化
#### Min-Max 归一化
\begin{equation}
x' = \frac{x - x_{min}}{x_{max} - x_{min}}
\end{equation}
```python
from sklearn.preprocessing import MinMaxScaler
scaler = MinMaxScaler()
numeric_cols = df.select_dtypes(include=[np.number]).columns
df[numeric_cols] = scaler.fit_transform(df[numeric_cols])From hongdotien10-hash/mathmodel-toolkit, MIT.
More from hongdotien10-hash/mathmodel-toolkit
- 0.479score
systematic-debugging
hongdotien10-hash
Debug experiment code with structured error analysis.
SkillCFreshness: CClaude Code +9 - 0.458score
逐题求解
hongdotien10-hash
按求解计划逐题编写Python代码求解,包含数据预处理、建模、求解、画图、灵敏度分析
SkillCFreshness: CClaude Code +9 - 0.458score
画图
hongdotien10-hash
使用matplotlib生成论文级质量图表,支持柱状图、折线图、热力图、散点图、饼图、箱线图等
SkillCFreshness: CClaude Code +9 - 0.458score
读取题目
hongdotien10-hash
读取数学建模竞赛的题目文件(PDF/DOCX)和数据文件(xlsx/docx),输出数据总览
SkillCFreshness: CClaude Code +9 - 0.458score
写论文
hongdotien10-hash
根据求解结果自动生成LaTeX论文,包含摘要、引言、模型建立与求解、检验、评价等完整章节
SkillCFreshness: CClaude Code +9 - 0.458score
编译论文
hongdotien10-hash
使用xelatex编译LaTeX论文,自动修复编译错误,执行排版优化
SkillCFreshness: CClaude Code +9 - 0.458score
求解计划
hongdotien10-hash
根据题目和数据生成详细的求解计划,包含思路、方法、输出标准和操作步骤
SkillCFreshness: CClaude Code +9 - 0.458score
代码检查
hongdotien10-hash
检查数学建模Python求解代码的规范性,包括绘图标准、执行顺序、依赖限制、统计输出
SkillCFreshness: CClaude Code +9 - 0.458score
全自动求解
hongdotien10-hash
数学建模竞赛全自动求解+论文生成,从读取题目到编译PDF一气呵成
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jul 22, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from hongdotien10-hash
- 0.479score
systematic-debugging
hongdotien10-hash
Debug experiment code with structured error analysis.
SkillCFreshness: CClaude Code +9 - 0.458score
逐题求解
hongdotien10-hash
按求解计划逐题编写Python代码求解,包含数据预处理、建模、求解、画图、灵敏度分析
SkillCFreshness: CClaude Code +9 - 0.458score
画图
hongdotien10-hash
使用matplotlib生成论文级质量图表,支持柱状图、折线图、热力图、散点图、饼图、箱线图等
SkillCFreshness: CClaude Code +9 - 0.458score
读取题目
hongdotien10-hash
读取数学建模竞赛的题目文件(PDF/DOCX)和数据文件(xlsx/docx),输出数据总览
SkillCFreshness: CClaude Code +9 - 0.458score
写论文
hongdotien10-hash
根据求解结果自动生成LaTeX论文,包含摘要、引言、模型建立与求解、检验、评价等完整章节
SkillCFreshness: CClaude Code +9 - 0.458score
编译论文
hongdotien10-hash
使用xelatex编译LaTeX论文,自动修复编译错误,执行排版优化
SkillCFreshness: CClaude Code +9
Cite this page
数据预处理 skill. Agent Mart. https://agentmart.dev/skills/hongdotien10-hash-4e38b5 (last updated 2026-10-24)