How the forecast works
Every week with a finished walk gets a harvest forecast for that week and the seven after it, 8 weeks in all. This page covers which method gives each week's number, how wide its range is, and how far to trust it, then how the walk turns fruit into kilograms. The forecast is on the week read under forecast, and on GET …/forecast?week= (default: the latest walk week).
Near and far weeks
- This week and the next two
- Counted from the fruit on the walk: red and turning fruit this week, then green fruit as they turn at the expected temperature. Their range shows once two weeks are checked.
- Weeks 4 to 8
- Followed further ahead from the green fruit and open flowers on the walk, or taken from your harvest history. Each is marked Rough until 8 weeks at that distance have been checked against a harvest, because until then its error can't be shown.
Which method each week uses
Each week ahead keeps its own method, chosen from how this cycle's earlier forecasts compared with the harvest. Only weeks before the walk are compared, so a backtest replays exactly what was issued.
- This week uses the walk. It moves to your harvest history once both have two checked weeks and the history was closer.
- Next week to week 8 use the mean of the last three weeks' harvests. Another method takes a week over only when it beats the current pick by at least 20% on mean error, over at least 8 checked weeks where both were offered. The new pick then stays until something beats it the same way, so one lucky week can't flip it back.
The methods are the walk, the three-week mean, the last harvest, the mean of the last harvest and recent harvests, and the History model: a forecasting model trained in advance on many crops' weekly harvests, given only this cycle's harvest history. The History model needs 4 logged harvest weeks and runs only where the server has it.
So weeks 4 to 8 come from your harvest history until the walk has earned them. The walk value is still kept on each row as model_kg, so its record builds up. With no harvest logged in the last 3 weeks there is nothing to compare, and the walk value is used. Each row names its method in chosen and why in selection. See History fallback and model choice.
Ranges
Every week has a range from the 10th to the 90th percentile, p10_kg to p90_kg, so about 8 in 10 harvests should fall inside it. At each distance it comes from the first of these that applies:
- This cycle's own misses, once 8 weeks at that distance are checked: the 10th and 90th percentile of how far its earlier forecasts were off.
- The History model's range, where it ran for that week: its own 10th and 90th percentile, taken around its middle value and applied to the forecast.
- A fixed widening otherwise: about 0.46 to 1.71 times the forecast this week, growing to about 0.46 to 2.89 times in week 8.
The History model's range and the fixed widening are calibrated on public tomato greenhouses, each greenhouse counting equally, so that about 8 in 10 weeks land inside. Some get wider and some narrower; the forecast itself does not change. Your cycle's own misses take over once it has 8 checked weeks at that distance.
The range never narrows from one week to the next. Weeks 4 to 8 show it as their range (low_kg and high_kg). This week and the next two show plus and minus the chosen method's mean past miss instead, once it has two checked weeks.
Totals over 4 and 8 weeks
Next to each week, the forecast gives two totals: the next 4 weeks and the next 8 weeks, this week included. A total is more accurate than any single week in it, because a week forecast too high and one forecast too low partly cancel. Plan picking crews and sales on a total, and the week itself on its range.
- The total adds up the weekly forecasts the table shows, so it always matches them.
- Its range comes from this cycle's own checked totals once 8 of that length are checked. Before that, it adds up the weekly ranges, as if every week missed the same way, so it is on the wide side.
- Rough marks a total until 8 of its length are checked.
A total is checked once every week in it has a harvest. Its error is the gap between the forecast total and the harvest total, as a share of the harvest total, and the Accuracy page gives it a trust level on the same terms as single weeks. Stored forecasts keep their totals, on windows next to forecasts.
Learned correction
A small learned model can correct what the forecast tends to miss on a cycle, per week ahead, from the fruit and flower counts, the temperature, this cycle's pace, and the week of the cycle. It is off until it has earned its place:
- It needs 12 checked weeks at that distance.
- On those weeks it is replayed in time order: each week is predicted only from weeks checked before it was issued.
- It turns on only when that replay cut the mean error by at least 10%. Otherwise the forecast is left exactly as it was.
Each row says whether it was used in correction. When it moved a value by 1% or more, the Forecast table shows the corrected value with a small line under it, for example “adjusted from 5.18 kg”, and the value before is in uncorrected_kg. A stored forecast keeps the name and version of the correction it was issued with. By default a cycle learns only from its own weeks. Learning across a greenhouse's cycles, or across organizations that agree to it, is a server setting.
Count fruit on tagged plants to sharpen the forecast
On round tomato, a weekly fruit count on the same few plants can sharpen weeks 3 to 8 of the forecast. Log it on Records → Fruit counts, and set the cycle's fruit type to Round tomato in Setup.
- What to log: tag at least 6 plants and keep counting the same ones. Once a week, type the standing fruit on each truss. Add the week its first fruit set if you know it. Tick thinned when fruit went by thinning, breakage or disease, not picking. Indoor temperature must be logged too (Climate).
- How many: it starts after 8 counts with at least 6 plants. The latest count must be at most 14 days old, with indoor temperature in the 7 days before the forecast week. Otherwise the forecast is exactly as without counts.
- What changes: weeks 3 to 8 that come from your harvest history. The counts show how much fruit will ripen in each of those weeks against what has been picked lately, and the week is moved up or down by a fixed share of that difference. This week, next week and the week after stay as they are: the counts did not improve them. Each moved week shows its value before, and the range moves with it.
- Which crops: round tomato only. On cherry tomato the counts did not improve the forecast, so they are kept but not used.
In a test on commercial tomato houses with weekly counts, kept apart by farm and in calendar order, it cut the error of weeks 3 to 8 on round tomato and of the 8-week total. Whether the forecast used the counts is in fruit_count on the forecast.
Trust labels
- Rough on a week 4 to 8 in the Forecast table means fewer than 8 weeks at that distance are checked. Plan with its range, not the number.
- The Accuracy page gives each week ahead a trust level from the backtest: Not enough weeks yet under 4 checked weeks; Reliable with at least 8, at most 15% mean error, and at least half the weeks inside the range; Rough at most 30%; Far off above that. See How far to trust the forecast.
This week and the next two, from the walk
- Horizon 0, the walk week
- Red and turning fruit on the walk, times kilograms per ripe fruit.
- Horizon 1, next week
- Green fruit on the walk that turn during that week, at that week's expected temperature, times the same kilograms per fruit.
- Horizon 2, the week after
- Green fruit on the walk that turn the week after, at that week's expected temperature.
Fruit that set after a walk are not on that walk, so horizon 2 runs low in a fast-setting week. The learned scale (below) takes up part of that.
The walk counts are read after your corrections, so a ripeness you changed or a fruit you added moves the forecast of that week. A forecast already stored keeps its number.
Ripening model
The model follows the fruit on a walk through three stages: green, turning, and red.
- Red and turning fruit are picked in the walk week, so they make horizon 0.
- Turning to red takes about 7 days and changes little with temperature, so it is held at 7 days.
- Green fruit move on at a pace set by the expected temperature of each week.
Fruit take less time from set to red in warmer weeks, but not in a straight line. Published greenhouse tomato studies give about 73 days at 17 °C and about 42 days at 26 °C, with little gain above 26 °C. DeepLeaf Yield draws a smooth curve through those two points, and the green phase is that time less the 7 turning days. The curve was set once from the published values, not fitted to any test data.
Green fruit on a walk are taken to be of evenly spread ages. Each week, the part of the green phase that passes at that week's temperature turns that share of them, so a warm week moves more fruit than a cool one. Once the whole green phase has passed, every green fruit on the walk has turned.
| Expected temperature | Days from set to red | Green fruit that turn in a week |
|---|---|---|
| 17 °C | 73 | 11% |
| 22 °C | 50 | 16% |
| 26 °C and above | 42 | 20% |
These shares are at this cycle's pace of 1, before it is learned.
This cycle's pace
Rows ripen faster or slower than the published curve, by cultivar, crop load, and climate. Each crop cycle learns a pace factor from its weekly walks:
- For each pair of walks a week apart, the turning fruit on the second walk are compared with the green fruit expected to turn after the first.
- Each comparison is kept between 0.2 and 5 times the curve.
- The pace is the average of those comparisons, counted as if two walks at 1 came first. It starts at 1, the published curve, and one odd walk can't move it far.
The forecast reports it as ripening_multiplier, with multiplier_walks for the number of walk pairs it rests on. Film the same row every week to give it something to learn from.
The earlier walk model, ripening-df-v1, stays available for comparison. Forecasts stored with it keep its name, and each walk model is judged only on its own earlier errors.
Expected temperature
- Walk week: the mean of measured indoor temperature readings. Without them, the outdoor weather passed through the greenhouse cover balance.
- Coming weeks: the weather forecast for the greenhouse location passed through the cover balance, shifted by the gap between measured indoor temperature and the balance on the walk week.
- With no weather forecast, the walk-week temperature is held. With nothing at all, 22 °C is assumed.
Each horizon reports its temperature_basis so you can see which one was used.
Greenhouse cover balance
Indoor temperature is estimated as outdoor temperature plus the solar gain left after cover loss and air exchange, with default coefficients for a single cover:
| House type | Transmittance | Cover loss (W/m²/K) | Air exchange (m/s) |
|---|---|---|---|
| plastic | 0.65 | 7.0 | 0.02 |
| shade | 0.45 | 8.0 | 0.03 |
| cooled | 0.70 | 6.0 | 0.05 |
A closed HVAC house is outside this balance. For those, log indoor temperature so the forecast has a measured value to use.
Kilograms per ripe fruit
This ratio turns fruit counts into kilograms, in this order:
- Harvest kilograms divided by red plus turning fruit, over earlier weeks that have both a walk and a harvest. It also carries how much of the row the walk sees.
- The walk's measured mass per red and turning fruit, when it had a scale.
- The grams typed for the cycle on
POST …/fruit-mass.
With none of these, the ripening forecast is withheld, and the harvest-history fallback is used if there is one.
Calibration
Each horizon is scaled by how its earlier forecasts compared with the harvests that followed. The scale starts at 1, at the ripening model, and moves toward what the harvests showed with each checked week. It stays between 0.05 and 50. Once two weeks are checked, low_kg and high_kg give a range from those errors.
Every number uses only data logged before the walk week, so a backtest replays exactly what would have been issued. Whether a week uses this value or your harvest history is decided as described under Which method each week uses, above.
Weeks 4 to 8, from the walk
The same walk is followed further ahead. Each of these weeks adds up two parts, times the same kilograms per ripe fruit as the first three weeks:
- Green fruit on the walk keep moving through the green phase week by week, from where week 3 left them. A green fruit is counted once: when the whole green phase has passed, nothing is left for later weeks.
- Open flowers on the walk: published greenhouse studies put fruit set at about 80% of flowers at moderate temperatures, and a set fruit starts to swell about 7 days after the flower opens. From there it follows the same green phase. Each truss seen counts as at least 3.5 flowers still to set, for walks where single flowers are hidden.
Past the weather forecast, the expected temperature is this cycle's own measured greenhouse mean over the last 4 weeks up to the walk. Without recent readings, its mean over the whole cycle is used, then the outdoor weather of those weeks through the cover balance, and with nothing at all 22 °C. Each row says which in temperature_basis.