snorkel-weak-supervision-labeling — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited snorkel-weak-supervision-labeling (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Hand-labeling clinical text is slow, expensive, and requires scarce expert time. Weak supervision flips the problem: experts encode their knowledge as labeling functions (LFs) noisy, partial heuristics and Snorkel's LabelModel learns each LF's accuracy and correlation to combine them into probabilistic training labels. You then train a normal classifier on those labels. This is the "training-set generation" approach for scaling supervised ML without a labeling army.
healthcare-predictive-modeling or a clinical NER/classifier.ABSTAIN).
medical-ontology-code-mapping), assertion-aware rules (via clinical-nlp-entity- extraction), or weak model votes. Each LF returns a class or ABSTAIN.
set; drop or fix low-value LFs.
labels** (no majority-vote naivety).
probabilistic labels, which generalizes beyond the LFs' coverage.
from snorkel.labeling import labeling_function, PandasLFApplier, LFAnalysis
from snorkel.labeling.model import LabelModel
import re
ABSTAIN, NO, YES = -1, 0, 1
@labeling_function()
def lf_current_smoker(x):
return YES if re.search(r"\b(current smoker|smokes daily|tobacco use)\b", x.text, re.I) else ABSTAIN
@labeling_function()
def lf_denies(x):
return NO if re.search(r"\b(denies (tobacco|smoking)|non-?smoker|never smoker)\b", x.text, re.I) else ABSTAIN
@labeling_function()
def lf_former(x):
return NO if re.search(r"\b(former smoker|quit smoking|ex-smoker)\b", x.text, re.I) else ABSTAIN
lfs = [lf_current_smoker, lf_denies, lf_former]
L = PandasLFApplier(lfs).apply(df)
print(LFAnalysis(L, lfs).lf_summary()) # coverage / overlaps / conflicts
label_model = LabelModel(cardinality=2)
label_model.fit(L, n_epochs=500, seed=42)
df["prob_label"] = label_model.predict_proba(L)[:, 1] # train downstream model on theseTrack LF coverage/conflict/accuracy during development and judge success only on the end model's metrics against a gold test set. Watch for correlated LFs that fool the LabelModel into overconfidence, and for systematic gaps where all LFs abstain (add LFs or collect a little gold there). Weak labels are noisy by design the win is scale.
probabilistic_labels.parquet example id, soft label, abstain mask.lf_analysis.csv per-LF coverage, overlap, conflict, empirical accuracy.weak_training_set.parquet ready for downstream model training.weak_supervision_report.md LF inventory, LabelModel quality, end-model metrics.A strong fit for clinical text where labels are scarce but expert heuristics and ontologies are plentiful. Composes directly with clinical-nlp-entity-extraction (assertion-aware LFs) and medical-ontology-code-mapping (ontology LFs). Keep a real gold set for honest evaluation never report weak-label agreement as accuracy.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.