协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
evaluation-splitting【开发与工程】Evaluate fitted LightFM recommenders and create leakage-safe train/test splits.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when a task is about offline ranking metrics, train/test splits, or debugging leakage in a fitted LightFM recommender.
precision_at_k, recall_at_k, auc_score, reciprocal_rank, or
LightFM.predict_rank for a fitted model.random_train_test_split and validate that
train and test interactions do not overlap.train_interactions, check_intersections, preserve_rows, metric
output shapes, top-k behavior, rank values, or tie handling.ValueError, suspiciously high test metrics, empty
metric arrays, zero-row users, sparse matrix input problems, or
num_threads errors.predict scoring, or loss
selection: read model-training.lightfm.LightFM model and SciPy sparse train/test
matrices with identical (n_users, n_items) shape. If the model was fit
with user or item features, pass compatible feature matrices into the metric
call as well.test_interactions as positives to rank. Remove
or zero-out negative feedback before ranking metrics; LightFM evaluation
treats any non-zero entry as an interaction.train_interactions=train for test metrics so known training positives
are excluded from the candidate ranking. Keep check_intersections=True
unless performing an intentional diagnostic.preserve_rows=False for aggregate means over users with test
positives, or preserve_rows=True when the output must stay aligned to the
original user axis.predict_rank interpretation.A deterministic, no-network fixture is bundled at scripts/evaluate_lightfm_fixture.py. It trains a tiny CPU model, computes all ranking metrics, validates a random split, and can intentionally demonstrate intersection handling.
k, split policy, feature matrices,
preserve_rows, and train-interaction filtering are the same.