Market-basket association rules API
Mine frequent itemsets and association rules with support, confidence, lift, leverage and conviction from caller baskets.
The Market-basket association rules operation is part of the Predictive Analytics Clustering Survival CLV API on BRAINIAC.software. Mine frequent itemsets and association rules with support, confidence, lift, leverage and conviction from caller baskets. It is exposed as POST /api/v1/predictive-analytics/market-basket-rules and priced at $0.04 USDC on Base. Payment uses the x402 exact scheme: an unpaid call returns HTTP 402 with payment requirements; after paying the exact USDC amount, retry the same request with a payment-signature header and Idempotency-Key. No account and no API key are required. Data sources for this product: Caller-supplied tabular, survival, basket and customer data processed locally Lloyd k-means / DBSCAN; PCA; CART; Fader–Hardie BG/NBD and Gamma-Gamma; PELT (Killick et al. 2012) Kaplan-Meier / Cox partial likelihood; association-rule support/confidence/lift definitions Limitations: Pure computation on caller input: no model hosting, no external ML API, and no network at request time. Row and column caps apply (typically 50,000 × 100 for tabular endpoints); responses report rowsUsed and caps. Randomised steps use the documented mulberry32 generator so seeded runs are reproducible. Outputs are statistical calculations for human review. They are not legal, medical, credit, tax or investment determinations. Outputs are compliance prechecks, drafts, or data lookups for human review. They are not official determinations, legal advice, identity confirmation, or certified filings. Related operations in this group include K-means clustering with silhouette k-selection, DBSCAN density clustering with noise labels, Principal component analysis, Train a CART decision tree. Open the group documentation for the full request schema, field notes, and response examples before integrating.
/api/v1/predictive-analytics/market-basket-rulesExample request
curl -i -X POST "https://www.brainiac.software/api/v1/predictive-analytics/market-basket-rules" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"baskets": [
[
"bread",
"milk"
],
[
"bread",
"diapers",
"beer",
"eggs"
],
[
"milk",
"diapers",
"beer",
"cola"
],
[
"bread",
"milk",
"diapers",
"beer"
],
[
"bread",
"milk",
"diapers",
"cola"
]
],
"minSupport": 0.4,
"minConfidence": 0.6,
"maxItemsetSize": 3,
"maxRules": 1000
}
JSONAn unpaid probe returns HTTP 402 with x402 payment requirements. After paying the exact USDC amount on Base, retry the identical request with a payment-signature header.
FAQ
- Do I need an API key? No. Pay the listed USDC amount with x402.
- What network? Base (eip155:8453), USDC.
- Is this an official determination? No. Results are for human review against the cited sources.
Related operations
- K-means clustering with silhouette k-selection — $0.04 USDC
- DBSCAN density clustering with noise labels — $0.04 USDC
- Principal component analysis — $0.03 USDC
- Train a CART decision tree — $0.03 USDC
Related APIs
Predictive Analytics Clustering Survival CLV APIFull docsHow it works