Skip to content

sampling: refactor#158

Merged
houtanb merged 1 commit intoforecastingresearch:mainfrom
houtanb:sampling
Feb 19, 2026
Merged

sampling: refactor#158
houtanb merged 1 commit intoforecastingresearch:mainfrom
houtanb:sampling

Conversation

@houtanb
Copy link
Member

@houtanb houtanb commented Feb 13, 2026

  • support stratified sampling for market questions across market value bins and time horizon (days until market close) bins
  • keep category-balanced sampling for data sources
  • more helpful logging
  • generate visuals using plotly when running locally
  • general cleanup

@houtanb houtanb requested a review from jcanedy February 13, 2026 17:45
def print_info_message(num_allocated: int, n: int) -> None:
if num_allocated != n:
logger.error(f"*** Problem allocating evenly... Allocated {num_allocated:,}/{n}. ***")
sys.exit(1)
Copy link
Member

Choose a reason for hiding this comment

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

nit: I'd potentially throw an exception in order to handle this.

* support stratified sampling for market questions across market value bins and time horizon (days
  until market close) bins
* keep category-balanced sampling for data sources
* more helpful logging
* generate visuals using plotly when running locally
* general cleanup
@houtanb houtanb merged commit 890d263 into forecastingresearch:main Feb 19, 2026
1 check passed
@houtanb houtanb deleted the sampling branch February 19, 2026 14:56
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.

2 participants