{"uid":"cap_F7-alXmCz2fP8NyYg4tni","slug":"delx-commerce-seeded-stratified-split-80ee7078","name":"Delx Commerce — Seeded Stratified Split","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/seeded-stratified-split?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"seed":{"type":"string","maxLength":8192,"description":"Seed supplied to Seeded Stratified Split; used only for this bounded calculation and processed in memory without retention."},"labels":{"type":"array","items":{"type":"string","maxLength":8192},"maxItems":256,"description":"Labels supplied to Seeded Stratified Split; used only for this bounded calculation and processed in memory without retention."},"test_fraction":{"type":"number","description":"Test Fraction supplied to Seeded Stratified Split; used only for this bounded calculation and processed in memory without retention."}}},"responseSchema":{"type":"json","example":{"result":{"test_indices":[0,2],"train_indices":[1,3,4]},"schema":"delx/util-seeded-stratified-split/v1","status":"pass","evidence":{"retained":false,"input_sha256":"08664b0c9a268e7fa50dce77287db1f0a1c365e4d2c6715a151b40ea08b5e4b9","external_calls":0},"operation":"seeded_decision:seeded_stratified_split"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_m4UBXxWbL-Qcl7v5H1awb","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Splits a labeled dataset into reproducible train/test index sets using a seed and stratified sampling, with verifiable in-memory processing and no data retention.","exampleAgentPrompt":"Split these labels [0,1,0,1,1,0,1,0] into train and test sets using seed 'exp-42' with a 20% test fraction, and give me back the train and test indices — no data should be retained.","exampleUseCases":[{"title":"Reproducible ML experiment partitioning","prompt":"I have a list of class labels for my dataset — [0,1,0,2,1,2,0,1,2,0] — and I need to split them into train and test sets with exactly 25% going to test. Use seed 'run-001' so I can reproduce this split later."},{"title":"Balanced split for cross-validation setup","prompt":"Take these sentiment labels ['pos','neg','pos','pos','neg','neg','pos','neg'] and create a stratified train/test split with seed 'cv-seed-7' and a test fraction of 0.3 — I need the index positions for each set."},{"title":"Verifiable audit-trail data partition","prompt":"Split my labeled sample indices with labels [1,0,1,1,0,0,1,0,1,0,0,1] using seed 'audit-2024' and a 20% test fraction, and confirm no input data was retained and give me the SHA256 of the input for audit purposes."}],"resultDescription":"Returns a JSON object containing test_indices and train_indices arrays (integer positions into the original labels array), a status field ('pass'), an operation identifier, and an evidence block confirming zero external calls, no data retention, and an SHA256 hash of the input for verifiability.","failureModes":["Invalid test_fraction (must be between 0 and 1 exclusive) causing a validation error","Labels array empty or containing fewer items than required to produce both train and test splits","Seed value exceeds 8192 character limit","Individual label strings exceed 8192 character limit","Labels array exceeds 256-item maximum","Payment failure or insufficient USDC balance preventing call execution"],"whenToPreferThis":"Prefer this endpoint when you need a reproducible, stratified train/test split without standing up any infrastructure, especially in agent workflows where verifiable no-retention processing and an audit-trail hash are important. It is ideal for one-shot, pay-per-call ML data partitioning with no signup overhead, and when class-balanced splits must be reproducible across runs via a fixed seed. It is not a substitute for full-featured ML pipeline tools when you need k-fold cross-validation or more complex sampling strategies.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T03:51:39.651Z","isFirstParty":false,"canonicalSlug":"delx-commerce-seeded-stratified-split-80ee7078"}