#regression
3 APIs with this tag
Linear Regression API
Linear least-squares regression as an API, computed locally and deterministically. The linear endpoint fits the best straight line y = a + b·x through a set of x/y data points by ordinary least squares, returning the slope b = Σ((x−x̄)(y−ȳ))/Σ(x−x̄)², the intercept a = ȳ − b·x̄, the ready-to-use equation, the Pearson correlation r and the coefficient of determination R² (the fraction of variance the line explains), and the residual and slope standard errors — the points (1,2),(2,4),(3,5),(4,4),(5,5) fit to y = 2.2 + 0.6·x with R² = 0.6, and a perfectly linear set returns R² = 1. Pass a predict_x and it also extrapolates the fitted value at that point. The predict endpoint evaluates y = intercept + slope·x for a known line. The x and y lists may be given as comma-separated values (x=1,2,3&y=2,4,5) or as JSON arrays in a POST body and must be equal length. Everything is computed locally and deterministically, so it is instant and private. Ideal for data-science, analytics, BI, forecasting, machine-learning-preprocessing and statistics-education app developers, trend-line and best-fit tools, and dashboards. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 2 endpoints. This is the regression line; for the Pearson correlation alone or descriptive statistics use a statistics API and for probability distributions a probability API.
api.oanor.com/regression-api
Statistics Calculator API
Descriptive-statistics maths as an API, computed locally and deterministically. The descriptive endpoint summarises a list of numbers — the count, sum, mean, median, mode, minimum, maximum and range, the population and sample variance and standard deviation, and the quartiles Q1/Q2/Q3 with the interquartile range by Tukey's method. The correlation endpoint computes the Pearson correlation coefficient r between two equal-length series — from −1 (perfect inverse) through 0 (none) to +1 (perfect direct) — along with R² and the covariance. The regression endpoint fits a least-squares line y = a + b·x, returning the slope, intercept and R², the equation, and an optional prediction for a given x. Data is accepted as a JSON array or a comma-separated list. Everything is computed locally and deterministically, so it is instant and private. Ideal for data-analysis, dashboard, research and education app developers, reporting and BI tools, and spreadsheet replacements. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is descriptive statistics; for probability distributions and combinatorics use a probability API.
api.oanor.com/statistics-api
Statistics API
Run statistics on a list of numbers without a spreadsheet or a stats package. The describe endpoint returns a full summary of a dataset — count, sum, min, max, range, mean, median, mode, the first and third quartiles and interquartile range, population and sample variance and standard deviation, coefficient of variation, geometric and harmonic means, skewness and kurtosis. Get any percentile of a dataset, the Pearson correlation coefficient (and r²) between two equal-length series, and a simple linear regression (slope, intercept, r² and the line equation). Input is a raw array of numbers (JSON or a comma-separated list) — no CSV, no headers. Perfect for analytics, A/B test summaries, sensor and metrics data, dashboards and quick exploratory analysis. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 5 endpoints. Distinct from the mathjs expression engine and from CSV per-column summaries.
api.oanor.com/stats-api