{"uid":"cap_UIDnBD1ILp6urLSz8lf9y","slug":"product-category-top-k-label-coverage-765cb247","name":"Product Category Top-k Label Coverage","description":"Product category - Top-k label coverage: Top-k label coverage for Product category. Up to 200 supplied labelled text records. Local dataset tools, evaluation and small naive-Bayes baselines; no hosted model or foundation-model training. One of 25 profiles or calculations across 20 shared operations in this sector. 0.01 USDC includes one bounded top-k label coverage deliverable.","url":"https://market.datapackvibe.com/x402/assistant-sector-ml-product-category-top-k?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"k":{"type":"integer","default":2,"maximum":4,"minimum":1},"records":{"type":"array","items":{"type":"object","required":["id","text","actual","predicted","probabilities"],"properties":{"id":{"type":"string","default":"","maxLength":80,"minLength":1},"text":{"type":"string","default":"","maxLength":1000},"actual":{"enum":["apparel","home","electronics","other"],"type":"string"},"predicted":{"enum":["apparel","home","electronics","other"],"type":"string"},"probabilities":{"type":"array","items":{"type":"number","default":0,"maximum":1,"minimum":0},"default":[],"maxItems":4,"minItems":4}},"additionalProperties":false},"default":[{"id":"example-0-0","text":"apparel sample document number 0 for this supplied dataset.","actual":"apparel","predicted":"apparel","probabilities":[0.8,0.06666666666666667,0.06666666666666667,0.06666666666666667]},{"id":"example-0-1","text":"apparel sample document number 1 for this supplied dataset.","actual":"apparel","predicted":"apparel","probabilities":[0.8,0.06666666666666667,0.06666666666666667,0.06666666666666667]},{"id":"example-0-2","text":"apparel sample document number 2 for this supplied dataset.","actual":"apparel","predicted":"apparel","probabilities":[0.8,0.06666666666666667,0.06666666666666667,0.06666666666666667]},{"id":"example-1-0","text":"home sample document number 0 for this supplied dataset.","actual":"home","predicted":"home","probabilities":[0.06666666666666667,0.8,0.06666666666666667,0.06666666666666667]},{"id":"example-1-1","text":"home sample document number 1 for this supplied dataset.","actual":"home","predicted":"home","probabilities":[0.06666666666666667,0.8,0.06666666666666667,0.06666666666666667]},{"id":"example-1-2","text":"home sample document number 2 for this supplied dataset.","actual":"home","predicted":"home","probabilities":[0.06666666666666667,0.8,0.06666666666666667,0.06666666666666667]},{"id":"example-2-0","text":"electronics sample document number 0 for this supplied dataset.","actual":"electronics","predicted":"electronics","probabilities":[0.06666666666666667,0.06666666666666667,0.8,0.06666666666666667]},{"id":"example-2-1","text":"electronics sample document number 1 for this supplied dataset.","actual":"electronics","predicted":"electronics","probabilities":[0.06666666666666667,0.06666666666666667,0.8,0.06666666666666667]},{"id":"example-2-2","text":"electronics sample document number 2 for this supplied dataset.","actual":"electronics","predicted":"electronics","probabilities":[0.06666666666666667,0.06666666666666667,0.8,0.06666666666666667]},{"id":"example-3-0","text":"other sample document number 0 for this supplied dataset.","actual":"other","predicted":"other","probabilities":[0.06666666666666667,0.06666666666666667,0.06666666666666667,0.8]},{"id":"example-3-1","text":"other sample document number 1 for this supplied dataset.","actual":"other","predicted":"other","probabilities":[0.06666666666666667,0.06666666666666667,0.06666666666666667,0.8]},{"id":"example-3-2","text":"other sample document number 2 for this supplied dataset.","actual":"other","predicted":"other","probabilities":[0.06666666666666667,0.06666666666666667,0.06666666666666667,0.8]}],"maxItems":200,"minItems":2}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_HjTNaYB4rKvD13EWBKC3o","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes top-k label coverage metric for a product category classifier across up to 200 labelled text records with 4 classes (apparel, home, electronics, other).","exampleAgentPrompt":"Evaluate my product category classifier using top-k label coverage at k=2 — I have 50 labelled records with actual labels (apparel, home, electronics, or other), predicted labels, and the 4-class probability scores for each record.","exampleUseCases":[{"title":"E-commerce classifier quality check","prompt":"I trained a product classifier that categorizes items into apparel, home, electronics, or other. Can you calculate the top-2 label coverage across my 80 test records so I can see how often the true category falls within the model's top 2 predictions? I have the text, actual labels, predicted labels, and probabilities ready."},{"title":"Comparing model iterations on product data","prompt":"I have two versions of my product category model and I want to benchmark the newer one. Can you compute the top-3 label coverage for 120 labelled product descriptions — actual and predicted labels are apparel, home, electronics, or other — using the class probability arrays I have?"},{"title":"Diagnosing misclassified product listings","prompt":"My product classifier is struggling with certain categories. Run a top-k label coverage evaluation at k=2 on these 30 mislabelled product records — I'll give you each item's text, the actual category, the predicted category, and the 4-class probabilities so we can see if the right label at least ranks in the top 2."}],"resultDescription":"Returns a top-k label coverage score indicating the proportion of records where the true label falls within the top-k highest-probability predictions, computed over up to 200 supplied labelled records across the four product categories (apparel, home, electronics, other).","failureModes":["More than 200 records supplied — request rejected or truncated","Probabilities array does not contain exactly 4 values per record — validation error","k value outside 1–4 range — schema validation failure","Missing required fields (id, text, actual, predicted, probabilities) in any record — error","Probability values outside [0,1] range — validation error"],"whenToPreferThis":"Choose this endpoint when you need to evaluate a product category text classifier (4 classes: apparel, home, electronics, other) using the top-k label coverage metric specifically — particularly useful when your model produces ranked probability outputs and you want to measure how often the correct label appears within the top k predictions. Prefer this over accuracy metrics when your downstream system can tolerate top-k predictions rather than requiring a single best guess.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-16T00:52:58.203Z","isFirstParty":false,"canonicalSlug":"product-category-top-k-label-coverage-765cb247"}