A dataset for a text classifier shows label imbalance and varying costs of misclassification. Which training approach most directly addresses cost-sensitive performance rather than just accuracy?
Answer
Use class-weighted loss (or focal loss) tuned to the misclassification cost matrix
Explanation
Cost-sensitive optimization requires the objective to reflect the different penalties for different errors. Weighted/focal losses can shift learning toward costly mistakes.
Last reviewed: October 2026
Reviewed by FirstInTest Editorial Team
Related questions
A teammate claims that using larger context windows automatically improves RAG performance. Which technical reason most strongly supports rejecting that claim?
View question →
In an enterprise RAG setup, which failure mode most directly causes hallucinated answers despite high retrieval recall, and how should it be mitigated?
View question →
A time-series forecasting model is deployed with concept drift. Which monitoring strategy is most appropriate to detect both distribution shift and degradation in predictive calibration?
View question →
Given a RAG pipeline with multiple retrievers (BM25 + dense) and an LLM re-ranker, which failure mode is most likely if you observe improved offline metrics but worse real user outcomes?
View question →
Which set of actions most directly reduces prompt injection risk in a tool-using agent that retrieves and executes external actions?
View question →
In a model governance plan, which control best reduces the risk of disallowed content being generated during high-stakes operations while preserving useful assistance?
View question →