{"slug":"linear-algebra-x402tookit-com-least-squares-421586","title":"Least-squares line or polynomial fit (degree 1 to 6, up to 100 points) with coef","host":"linear-algebra.x402tookit.com","method":"GET","resource":"https://linear-algebra.x402tookit.com/least-squares","category":"other","description":"Least-squares line or polynomial fit (degree 1 to 6, up to 100 points) with coefficients, R-squared and residuals.","price_listed":0.02,"price_asked":0.02,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":1042,"reported_calls_30d":1,"reported_payers_30d":1,"networks":["eip155:137","eip155:42161","eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"method":"GET","queryParams":{"degree":1,"x":"[1,2,3,4]","y":"[6,5,7,10]"},"type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"method":{"enum":["GET"],"type":"string"},"queryParams":{"properties":{"at":{"description":"Optional x at which to evaluate the fitted curve","type":"number"},"degree":{"description":"Polynomial degree 1 to 6 (default 1 = straight line); needs at least degree+1 points","type":"integer"},"x":{"description":"x values, JSON like [1,2,3,4] or 1,2,3,4 (up to 100)","type":"string"},"y":{"description":"y values, same count as x","type":"string"}},"required":["x","y"],"type":"object"},"type":{"const":"http","type":"string"}},"required":["type","method"],"type":"object"},"output":{"properties":{"example":{"properties":{"asOf":{"type":["null","string"]},"coefficientOrder":{"type":["null","string"]},"coefficients":{"items":{"type":"number"},"type":["array","null"]},"conditioning":{"properties":{"centre":{"type":["null","number"]},"halfRange":{"type":["null","number"]},"note":{"type":["null","string"]}},"type":["null","object"]},"degraded":{"type":["boolean","null"]},"degree":{"type":["null","number"]},"disclaimer":{"type":["null","string"]},"fitted":{"items":{"type":"number"},"type":["array","null"]},"intercept":{"type":["null","number"]},"notChecked":{"items":{"type":"string"},"type":["array","null"]},"points":{"type":["null","number"]},"rSquared":{"type":["null","number"]},"reasons":{"items":{"type":"string"},"type":["array","null"]},"residualStandardError":{"type":["null","number"]},"residuals":{"items":{"type":"number"},"type":["array","null"]},"rmse":{"type":["null","number"]},"slope":{"type":["null","number"]},"source":{"type":["null","string"]},"sumSquaredResiduals":{"type":["null","number"]},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]}},"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-10-21","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.02,"price_match":true,"latency_ms":1042,"error":null}],"description_full":"Least-squares line or polynomial fit (degree 1 to 6, up to 100 points) with coefficients, R-squared and residuals.","last_updated":"2026-10-20T20:46:26.37Z","schemes":["exact"]}