ModelAdapter.score#

abstractmethod ModelAdapter.score(X, y, **kwargs)[source]#

Return per-unit \(R^2\) scores in the canonical container.

Every backend returns a pandas.Series with one unit_{i}_r2 entry per treated unit. Backends with posterior dispersion also include unit_{i}_r2_std entries.

Parameters:
  • X (Any) – Predictor matrix.

  • y (Any) – Observed outcomes.

  • **kwargs (Any) – Additional keyword arguments forwarded to the underlying model.

Returns:

Per-treated-unit \(R^2\) values and optional posterior standard deviations.

Return type:

pd.Series