yobx.sklearn.linear_model.glm#

yobx.sklearn.linear_model.glm.sklearn_glm_regressor(g: GraphBuilderExtendedProtocol, sts: Dict, outputs: List[str], estimator: TweedieRegressor | PoissonRegressor | GammaRegressor, X: str, name: str = 'glm_regressor') str[source]#

Converts a sklearn GLM regressor (TweedieRegressor, PoissonRegressor, GammaRegressor) into ONNX.

GLMs apply an inverse link function to the linear predictor:

X  ──Gemm(coef, intercept, transB=1)──►  linear_pred
                                                │
                                  inverse_link(·) ──►  predictions

Supported link functions:

  • IdentityLink: pass-through (no extra node)

  • LogLink: Exp applied to the linear predictor

Parameters:
  • g – the graph builder to add nodes to

  • sts – shapes defined by scikit-learn

  • outputs – desired output names

  • estimator – a fitted GLM regressor

  • X – input tensor name

  • name – prefix for added node names

Returns:

output tensor name

Raises:

NotImplementedError – when an unsupported link function is encountered