.. _op_ai_onnx_ml_LinearRegressor: LinearRegressor =============== - **Domain**: ``ai.onnx.ml`` - **Since version**: 1 Generalized linear regression evaluation. If targets is set to 1 (default) then univariate regression is performed. If targets is set to M then M sets of coefficients must be passed in as a sequence and M results will be output for each input n in N. The coefficients array is of length n, and the coefficients for each target are contiguous. Intercepts are optional but if provided must match the number of targets. **Inputs** - **X** (*T*): Data to be regressed. **Outputs** - **Y** (*tensor(float)*): Regression outputs (one per target, per example). **Type Constraints** - **T**: The input must be a tensor of a numeric type. Allowed types: tensor(double), tensor(float), tensor(int32), tensor(int64). Examples -------- **test_cc_linearregressor_single_target** .. code-block:: text Node: ai.onnx.ml.LinearRegressor(x) -> (y) Attributes: coefficients = [0.5, -1.0] intercepts = [0.25] targets = 1 post_transform = "NONE" .. code-block:: text Inputs: x: shape=(2, 2), dtype=float32 [[2., 1.], [0., 3.]] Outputs: y: shape=(2, 1), dtype=float32 [[ 0.25], [-2.75]]