Random-forest OOB score and permutation importance API

Train a small seeded random forest, report out-of-bag accuracy or R², and estimate permutation feature importance with Fisher-Yates shuffles.

The Random-forest OOB score and permutation importance operation is part of the Predictive Analytics Clustering Survival CLV API on BRAINIAC.software. Train a small seeded random forest, report out-of-bag accuracy or R², and estimate permutation feature importance with Fisher-Yates shuffles. It is exposed as POST /api/v1/predictive-analytics/random-forest-importance and priced at $0.05 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.

POST$0.05 USDC
/api/v1/predictive-analytics/random-forest-importance

Example request

curl -i -X POST "https://www.brainiac.software/api/v1/predictive-analytics/random-forest-importance" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "task": "classification",
  "columns": [
    "signal",
    "noise1",
    "noise2"
  ],
  "rows": [
    [
      0,
      0,
      0
    ],
    [
      0.025,
      37,
      53
    ],
    [
      0.05,
      74,
      9
    ],
    [
      0.075,
      10,
      62
    ],
    [
      0.1,
      47,
      18
    ],
    [
      0.125,
      84,
      71
    ],
    [
      0.15,
      20,
      27
    ],
    [
      0.175,
      57,
      80
    ],
    [
      0.2,
      94,
      36
    ],
    [
      0.225,
      30,
      89
    ],
    [
      0.25,
      67,
      45
    ],
    [
      0.275,
      3,
      1
    ],
    [
      0.3,
      40,
      54
    ],
    [
      0.325,
      77,
      10
    ],
    [
      0.35,
      13,
      63
    ],
    [
      0.375,
      50,
      19
    ],
    [
      0.4,
      87,
      72
    ],
    [
      0.425,
      23,
      28
    ],
    [
      0.45,
      60,
      81
    ],
    [
      0.475,
      97,
      37
    ],
    [
      0.5,
      33,
      90
    ],
    [
      0.525,
      70,
      46
    ],
    [
      0.55,
      6,
      2
    ],
    [
      0.575,
      43,
      55
    ],
    [
      0.6,
      80,
      11
    ],
    [
      0.625,
      16,
      64
    ],
    [
      0.65,
      53,
      20
    ],
    [
      0.675,
      90,
      73
    ],
    [
      0.7,
      26,
      29
    ],
    [
      0.725,
      63,
      82
    ],
    [
      0.75,
      100,
      38
    ],
    [
      0.775,
      36,
      91
    ],
    [
      0.8,
      73,
      47
    ],
    [
      0.825,
      9,
      3
    ],
    [
      0.85,
      46,
      56
    ],
    [
      0.875,
      83,
      12
    ],
    [
      0.9,
      19,
      65
    ],
    [
      0.925,
      56,
      21
    ],
    [
      0.95,
      93,
      74
    ],
    [
      0.975,
      29,
      30
    ]
  ],
  "target": [
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1,
    1
  ],
  "trees": 40,
  "maxFeatures": "sqrt",
  "maxDepth": null,
  "seed": 42,
  "permutationRepeats": 2
}
JSON

An 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 APIs

Predictive Analytics Clustering Survival CLV APIFull docsHow it works