yobx.sklearn.covariance.ledoit_wolf#
- yobx.sklearn.covariance.ledoit_wolf.sklearn_ledoit_wolf(g: GraphBuilderExtendedProtocol, sts: Dict, outputs: List[str], estimator: LedoitWolf, X: str, name: str = 'ledoit_wolf') str[source]#
Converts a
sklearn.covariance.LedoitWolfinto ONNX.The converter maps to
mahalanobis(), returning the squared Mahalanobis distance from the fitted distribution for each observation:where
is
location_andis
precision_.Full graph structure:
X (N, F) │ └─ Sub(location_) ──► X_centered (N, F) │ ├─ MatMul(precision_) ──► X_prec (N, F) │ │ └──────────────────── Mul ──► X_prec_centered (N, F) │ ReduceSum(axis=1) ──► mahal_sq (N,) [output]- Parameters:
g – the graph builder to add nodes to
sts – shapes defined by scikit-learn
outputs – desired output names;
outputs[0]receives the squared Mahalanobis distancesestimator – a fitted
LedoitWolfX – input tensor name
name – prefix for added node names
- Returns:
output tensor name