www.brainiac.software/api/v1/predictive-analytics/decision-tree-train
Fit a classification or regression CART tree with depth and leaf limits, readable rules, feature importance and optional predictions. Docs: https://www.brainiac.software/api/predictive-analytics/decision-tree-train
POST
https://www.brainiac.software/api/v1/predictive-analytics/decision-tree-trainUptimeNot checked yet
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://www.brainiac.software/api/v1/predictive-analytics/decision-tree-train", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"columns":["age","income"],"maxDepth":2,"minSamplesLeaf":1,"predict":[[33,66]],"rows":[[25,40],[35,60],[45,80],[20,20],[50,90],[23,30],[40,70],[60,100],[30,50],[55,95]],"target":[0,0,1,0,1,0,1,1,0,1],"task":"classification"}),
});
console.log(await res.json());Example input
{
"columns": [
"age",
"income"
],
"maxDepth": 2,
"minSamplesLeaf": 1,
"predict": [
[
33,
66
]
],
"rows": [
[
25,
40
],
[
35,
60
],
[
45,
80
],
[
20,
20
],
[
50,
90
],
[
23,
30
],
[
40,
70
],
[
60,
100
],
[
30,
50
],
[
55,
95
]
],
"target": [
0,
0,
1,
0,
1,
0,
1,
1,
0,
1
],
"task": "classification"
}