augmentDrop function exported ✓ 100.0%

Last updated: 2026-02-24T21:07:57.579Z

Metrics

LOC: 4 Complexity: 2 Params: 2 Coverage: 100.0% (2/2 lines, 1929x executed)

Signature

augmentDrop(signals: string, dropRate = 0.2): : string

Summary

Simple augmentation: drop random word(s)

Source Code

export function augmentDrop(signals: string, dropRate = 0.2): string {
  const words = signals.split(/\s+/);
  return words.filter(() => Math.random() > dropRate).join(" ") || words[0]; // Keep at least one word
}

No outgoing dependencies.

Impact (Incoming)

graph LR augmentDrop["augmentDrop"] buildKeywordsFromDictionary["buildKeywordsFromDictionary"] augmentTrainingSamples["augmentTrainingSamples"] buildKeywordsFromDictionary -->|uses| augmentDrop augmentTrainingSamples -->|calls| augmentDrop style augmentDrop fill:#dbeafe,stroke:#2563eb,stroke-width:2px click augmentDrop "fc8dabee39176edb.html" click buildKeywordsFromDictionary "dfb7d9bfef2aba38.html" click augmentTrainingSamples "40bb393b12ff4d6e.html"