linear_regression_prediction
Predicts the y-value for a given x-value using simple linear regression (least squares method) fitted to the provided data points. (cost: 1 credit)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target_x | No | number, required, the x-value for which to predict y | |
| x_values | No | array of numbers, required, the x-coordinates of data points | |
| y_values | No | array of numbers, required, the y-coordinates of data points (same length as x_values) |