Skip to content

Conversation

@shivkanthb
Copy link
Contributor

@shivkanthb shivkanthb commented Oct 9, 2024

Project Robyn

Summary of Changes

This PR introduces a new CalibrationInputValidation class and corresponding unit tests to ensure the validity of calibration input data in the Robyn project. The validation checks include:

  • Date range
  • Lift values
  • Spend values
  • Confidence values
  • Metric values for each channel in the calibration input
  • Objective weights validation

Fixes # (issue number, if applicable)

Type of change

  • feat: New feature (non-breaking change which adds functionality)
  • test: Additional test coverage

How Has This Been Tested?

A comprehensive suite of unit tests has been implemented to cover various scenarios:

  • Valid calibration input
  • Invalid date ranges
  • Invalid lift values
  • Mismatched spend values
  • Low confidence values
  • Mismatched metric values
  • Valid and invalid objective weights

The test_validate function provides an end-to-end test of the validation process

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 9, 2024
@shivkanthb
Copy link
Contributor Author

In addition to the calibration validation i also added another function check_obj_weights which seemed important. The function implementation is in place and tested with unit tests but not called anywhere yet in calibration. Feel free to move that later to the right spot (maybe some catch all validation class) or remove if not needed.

@shivkanthb shivkanthb merged commit 1395ac1 into robynpy_release Oct 9, 2024
@shivkanthb shivkanthb deleted the feature/calibration_input_validation branch October 9, 2024 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants