Skip to content

Comments

[#723] Fix inconsistent farmer distribution in IDC auto segmentation#724

Merged
wayangalihpratama merged 4 commits intostagingfrom
feature/723-bug-inconsistent-farmer-distribution-in-idc-auto-segmentation
Feb 17, 2026
Merged

[#723] Fix inconsistent farmer distribution in IDC auto segmentation#724
wayangalihpratama merged 4 commits intostagingfrom
feature/723-bug-inconsistent-farmer-distribution-in-idc-auto-segmentation

Conversation

@wayangalihpratama
Copy link
Contributor

@wayangalihpratama wayangalihpratama commented Feb 17, 2026

Summary

This PR addresses numerical segmentation inconsistencies by implementing new strategies to ensure a more balanced distribution of entities across all segments.

Key Changes

  • Numerical Segmentation: Switched to non-interpolating quantiles (closest_observation) to eliminate empty segments and artificial thresholds caused by data gaps.
  • New Strategies: Added support for Equal Interval strategy in backend segmentation logic for better interval-based grouping.
  • API Updates: Updated Pydantic models and routes to support optional strategy selection in segmentation previews and recalculations.
  • Unit Tests: Added backend/tests/test_unit_segmentation_strategy.py for comprehensive coverage of segmentation strategies, including quantile and equal interval methods.

Verification

  • Ran backend unit tests: test_unit_segmentation_strategy.py successfully verified quantile and equal interval strategies.

@wayangalihpratama wayangalihpratama self-assigned this Feb 17, 2026
@wayangalihpratama wayangalihpratama merged commit 55e8a43 into staging Feb 17, 2026
1 check passed
@wayangalihpratama wayangalihpratama deleted the feature/723-bug-inconsistent-farmer-distribution-in-idc-auto-segmentation branch February 17, 2026 10:21
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] Inconsistent Farmer Distribution in IDC Auto-Segmentation

1 participant