Skip to content

Add tests for compute_bias function - #247

Closed
mspandey wants to merge 1 commit into
Him-an-shi:mainfrom
mspandey:patch-22
Closed

Add tests for compute_bias function#247
mspandey wants to merge 1 commit into
Him-an-shi:mainfrom
mspandey:patch-22

Conversation

@mspandey

@mspandey mspandey commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description

This pull request expands backend/tests/test_prediction_feedback.py as requested in Issue #168 to add robust test coverage for negative bias detection and neutral/fluctuating patterns within the adaptive learning compute_bias function.

Details:

  • Negative Bias Testing: Added test_compute_bias_detects_negative_pattern to verify that consistently early periods ([-2, -3, -2, -1]) correctly calculate a negative bias (< 0).
  • Fluctuating Bias Testing: Added test_compute_bias_neutral_fluctuation to verify that wildly fluctuating error inputs ([3, -3, 2, -2]) result in a negligible or zero bias.
  • CI Pipeline Reliability: Ensures comprehensive coverage of mathematical directional drift across all edge cases in the prediction feedback engine.

Closes #168

### Description
This pull request expands `backend/tests/test_prediction_feedback.py` as requested in [Issue #168](#168) to add robust test coverage for negative bias detection and neutral/fluctuating patterns within the adaptive learning `compute_bias` function.

#### Details:
* **Negative Bias Testing:** Added `test_compute_bias_detects_negative_pattern` to verify that consistently early periods (`[-2, -3, -2, -1]`) correctly calculate a negative bias (`< 0`).
* **Fluctuating Bias Testing:** Added `test_compute_bias_neutral_fluctuation` to verify that wildly fluctuating error inputs (`[3, -3, 2, -2]`) result in a negligible or zero bias.
* **CI Pipeline Reliability:** Ensures comprehensive coverage of mathematical directional drift across all edge cases in the prediction feedback engine.

Closes #168
Copilot AI lite review requested due to automatic review settings August 4, 2026 18:47
@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

@mspandey is attempting to deploy a commit to the himanshipathak-240263-3015's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@mspandey mspandey closed this by deleting the head repository Aug 16, 2026
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.

test(prediction): missing coverage for negative and fluctuating bias patterns

2 participants