Skip to content

fix(regression): return variance (σ²) instead of std dev (σ) in DummyProbaRegressor._predict_var#982

Open
tysoncung wants to merge 1 commit intosktime:mainfrom
tysoncung:fix/975-dummy-predict-var-returns-std-not-variance
Open

fix(regression): return variance (σ²) instead of std dev (σ) in DummyProbaRegressor._predict_var#982
tysoncung wants to merge 1 commit intosktime:mainfrom
tysoncung:fix/975-dummy-predict-var-returns-std-not-variance

Conversation

@tysoncung
Copy link

Problem

DummyProbaRegressor._predict_var returns the standard deviation (σ) of the training labels instead of the variance (σ²). This is a unit-mismatch bug — predict_var should return variance, not standard deviation.

Solution

Changed self._sigma to self._sigma ** 2 in _predict_var, so the method correctly returns variance (σ²) as documented.

Files Changed

  • skpro/regression/dummy.py: Fixed _predict_var to return self._sigma ** 2 instead of self._sigma

Verification

import numpy as np
# Before fix: _predict_var returns np.std(y) ≈ σ
# After fix: _predict_var returns np.std(y) ** 2 ≈ σ² (variance)

Closes #975

…ProbaRegressor._predict_var (sktime#975)

_predict_var was returning self._sigma (standard deviation) instead of
self._sigma ** 2 (variance), causing numerically incorrect results for
any downstream usage of predict_var.

Closes sktime#975
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] DummyProbaRegressor._predict_var returns std dev (σ) instead of variance (σ²)

1 participant