weighted_sampler

Official

Efficient Weighted Sampling from JSONL Files

Authorcas-bigdatalab
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill addresses the need for precise weighted sampling from JSONL files, offering a solution for when users require a subset of records with higher probability based on their weights.

Core Features & Use Cases

  • Weighted Sampling: Perform random sampling on JSONL records with customizable weights.
  • Sampling Modes: Supports both with-replacement and without-replacement sampling.
  • Use Case: Ideal for scenarios where you need to prioritize certain records based on their importance or priority score.

Quick Start

Utilize the weighted_sampler skill to randomly sample 1000 records from 'data.jsonl' with 'priority_score' as the weight field and save the results to 'sampled.jsonl'.

Dependency Matrix

Required Modules

None required

Components

scripts

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: weighted_sampler
Download link: https://github.com/cas-bigdatalab/piflow/archive/main.zip#weighted-sampler

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 620,000+ vetted skills library on demand.