{"uid":"cap_nTOfPfd6mAU5AtXyrhEN4","slug":"api-quantoracle-dev-d1b772ba","name":"QuantOracle Polynomial Regression","description":"QuantOracle: stats/polynomial-regression","url":"https://api.quantoracle.dev/v1/stats/polynomial-regression","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"x":{"type":"array","items":{"type":"number"},"title":"X","description":"Independent variable array"},"y":{"type":"array","items":{"type":"number"},"title":"Y","description":"Dependent variable array"},"degree":{"type":"integer","title":"Degree","default":2,"maximum":10,"minimum":1,"description":"Polynomial degree (1=linear, 2=quadratic, etc.)"}}},"responseSchema":null,"example":{"request":{"input":{"body":{"x":[1,2,3,4,5],"y":[2.1,4,9.2,16.1,25.3],"degree":2},"type":"http","method":"POST","bodyType":"json"}},"response":{"ms":11.23,"aic":3.26,"bic":2.09,"mse":0.033829,"_meta":{"url":"https://quantoracle.dev","docs":"https://api.quantoracle.dev/docs","powered_by":"QuantOracle"},"degree":2,"predicted":[1.9686,4.3257,9.0114,16.0257,25.3686],"r_squared":0.9995,"coefficients":[1.94,-1.135714,1.164286],"adjusted_r_squared":0.9991}},"exampleRequest":{"x":[1,2,3,4,5],"y":[2.1,4,9.2,16.1,25.3],"degree":2},"tags":["x402"],"displayCostAmount":"0.008","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.008/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.008","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.008","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_sp1jrZD2pYh_5uFfpr1kH","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.008","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fits a polynomial regression model of a specified degree to X/Y data and returns coefficients, predictions, and model quality statistics (R², AIC, BIC, MSE).","exampleAgentPrompt":"Fit a degree-2 polynomial regression to my data — x values are [1, 2, 3, 4, 5] and y values are [2.1, 4.0, 9.2, 16.1, 25.3] — and give me the coefficients, predicted values, and R-squared.","exampleUseCases":null,"resultDescription":"Returns polynomial coefficients, predicted Y values for each input X, R-squared, adjusted R-squared, MSE, AIC, BIC, the polynomial degree used, and computation time in milliseconds.","failureModes":["Mismatched x and y array lengths returns a 400 validation error","Degree greater than number of data points minus 1 causes underdetermined system error","Non-numeric values in x or y arrays return a parsing/validation error","Very large degree values may cause numerical instability or timeout","Empty arrays return a 400 bad request error"],"whenToPreferThis":"Use this endpoint when you need to model a nonlinear (curved) relationship between two numeric variables and want full model diagnostics (AIC, BIC, MSE, R²) alongside predictions. Prefer it over linear regression when your data has curvature, and over generic ML models when you need interpretable polynomial coefficients and statistical model-selection criteria.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:48:18.983Z","isFirstParty":false}