Skip to content

Develop leakage-safe realized gross-margin prediction #8

Description

@unes07

Problem

A realized gross-margin model could support pre-season risk analysis, but it would be misleading without sufficient observed farm outcomes, privacy controls, temporal evaluation, and transparent deterministic baselines.

Status: Blocked

Blocked by:

Implementation must not start until the readiness gate below is satisfied.

Readiness gate

  • At least 500 complete farm-season observations.
  • At least 100 distinct pseudonymized farms.
  • At least three regions and two agricultural seasons.
  • A documented missingness, consent, retention, and geographic-privacy audit.
  • A stable deterministic gross-margin target definition shared with the calculator.

Proposed target and prediction point

Predict realized_gross_margin_mad_ha at a pre-season decision point. Features may include only information available when the recommendation is generated. Actual yield, realized sale price, post-season costs, and other future information must not be used as features.

Acceptance criteria

  • Split evaluation by farm and time so no farm or future season leaks into training.
  • Compare against mean, linear, and deterministic-scenario baselines.
  • Report crop-level and regional errors plus calibrated prediction intervals.
  • Publish feature-availability and leakage audits.
  • Refuse publication if the model does not beat transparent baselines.
  • Do not label the target net profit without complete fixed, financing, tax, and capital costs.
  • Document unsupported regions, crops, farm types, and seasons in the model card.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions