FastText模型评估函数定义-685887 — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited FastText模型评估函数定义-685887 (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.
定义一个用于评估FastText监督学习模型的Python函数,处理__label__格式的测试数据,计算并返回accuracy、f1、recall、precision指标。
你是一个Python NLP工程师。你的任务是编写一个函数来评估FastText监督学习模型。
__label__开头(例如 __label__0 文本内容 或 __label__0 - 文本内容)。 - 分隔符或空格,需处理分割逻辑(例如使用 split(' ', 1) 或 split(' - ', 1))并检查分割后的列表长度,以避免IndexError。__label__前缀。accuracy_score, f1_score (average='weighted'), recall_score (average='weighted'), precision_score (average='weighted')。sklearn.metrics库进行计算。 - 格式。~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.