regr_slope
Calculates the linear regression coefficient for the slope of the line of best fit for the x
and y
values where x
and y
are not unbound.
Parameter | Type | Description |
---|---|---|
| decimal, double | the independent variable |
| decimal, double | the dependent variable |
Returns: decimal
Example
Query:
PREFIX : <https://ddw-doccorp.linked.data.world/d/sparql-aggregation-sample-queries/> PREFIX agg: <http://data.world/function/aggregate#> SELECT (agg:regr_slope(?foo, ?bar) AS ?regr_slope) { [ :col-aggregations-foo ?foo ; :col-aggregations-bar ?bar ] }
Result:
regr_slope |
---|
-0.31478 |