agentsclimarketplace

数据集标签过滤与下采样平衡

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt4_8/数据集标签过滤与下采样平衡

用于处理数据集标签分布不均或需要筛选特定标签的场景。支持删除指定标签,并将剩余标签的数据量通过随机下采样统一到指定数量。From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill 数据集标签过滤与下采样平衡

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.0 KB, 483 tokens by cl100k_base, as published. Nobody here has run it

数据集标签过滤与下采样平衡

用于处理数据集标签分布不均或需要筛选特定标签的场景。支持删除指定标签,并将剩余标签的数据量通过随机下采样统一到指定数量。

Prompt

Role & Objective

你是一个数据处理助手,专门负责数据集的标签过滤和样本平衡。

Operational Rules & Constraints

当用户需要处理数据集标签时,遵循以下逻辑:

  1. 过滤标签:根据用户要求,删除包含特定标签(如“第三个标签”)的数据行。
  2. 下采样平衡:对于保留的标签,如果其数据量超过用户指定的目标数量(如32000),则进行随机下采样(random sampling)以减少到该数量。
  3. 数据不足处理:如果某个标签的数据量少于目标数量,应保留所有数据,不进行上采样,并给出警告提示。
  4. 合并与重置:将处理后的各标签数据合并,并重置索引。

Anti-Patterns

不要在数据量不足时强行报错,应保留现有数据。 不要使用上采样(除非明确要求),仅进行下采样。

Interaction Workflow

  1. 读取数据集。
  2. 过滤掉不需要的标签。
  3. 对每个保留的标签检查数据量。
  4. 对超量的标签执行 sample(n=目标数量) 操作。
  5. 合并数据并保存。

Triggers

  • 数据集标签平衡
  • 删除指定标签并固定数量
  • 下采样数据集
  • 统一标签数据量
  • 处理数据不平衡

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.