Seeded synthetic support tickets in five categories; Tribuo and Smile logistic regression and Smile naive Bayes against a majority baseline; skewed classes, train/test duplicates, vocabulary drift and the three different answers to a ticket of unseen words; a zero-shot client for OpenAI-compatible endpoints tested against a fake endpoint (no model was called) and a cost formula with assumed prices. Every figure is written to output/ by the tests that assert it. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b69H5rTewUKPyhGS8r
15 lines
396 B
Java
15 lines
396 B
Java
package com.ankurm.classicml;
|
|
|
|
import java.util.List;
|
|
|
|
/** The one contract every contender implements, so the harness measures them identically. */
|
|
public interface TextClassifier {
|
|
|
|
String name();
|
|
|
|
void train(List<Ticket> train);
|
|
|
|
/** The category, or {@code null} when the model has no basis to answer (counted as wrong by {@link Metrics}). */
|
|
Category predict(String text);
|
|
}
|