Input forecasting


Managing production is not a simple task, and it requires careful planning of inputs and resources. Forecasting the number of inputs needed either in processing or further input production allows for better planning and cost reduction. For that, a forecasting solution was created so users can carefully plan input intake and thus avoid input wasting. 

For production processes, input usage is important since it determines the end cost of the final product. Using the optimal quantity to avoid wastage leads to lower costs and better production management. If you can detect how many inputs a production unit needs at a certain time, you can plan how much is optimal to use to generate great results. This allows the producer to avoid creating backlogs and warehouse overcrowding if they ordered much more materials than needed. 

There are periods when they’ll need less input or more. Predicting input intake based on the production unit’s needs, by using historical data and machine learning, led to the creation of a solution that significantly lowers costs. It also ensures that inputs that are used immediately at the right time will keep the same quality and characteristics, thus making sure that the end products are quality as well. The solutions that predict input needs, serve as a base for more accurate procurement and production planning.

Project scope


  • Client interviews
  • Data validation
  • Project planning 


  • Data cleansing
  • Data analysis
  • Baseline model implementation
  • Feature engineering
  • Model selection
  • Deployment to production


  • Data scientists
  • Data engineers

Project goal:

  • The project goal was to predict input spending a few days ahead and reduce waste and costs.

Project duration:

  • 6 months


  • Algorithms
    • Linear regression with regularization 
    • Random forest regression
    • kNN regression
    • The optimal model (algorithm and hyperparameters) for each pen was selected with a grid search
  • The model minimizes Root Mean Squared Error
  • As heat index and average DMI per pen (actually animal location) have a different scales, a standard scaler was used to scale data and improve forecast accuracy
  • For selecting the best algorithm and hyperparameters, GridSearchCV from scikit-learn was used with a combination of a custom implementation of rolling origin cross-validation for time series
  • Linear regression, ridge regress, random forest regressor, KNN regressor
  • To estimate the feature importance, a random forest model was used which was trained regardless of the selected model

Technologies used:






Main goals:

Main issues:

Main goals:

  • Predict the optimal number of inputs that will be used or spent
  • Predict the feed intake based on climate data
  • Create an accurate forecasting solution
  • Decrease costs on the input side of the process

Main issues:

  • Data collection from multiple sources that weren’t always accurate
  • Consolidation of multiple data sources with different types of data
  • Concerns regarding data quality and bad data

Our approaches:

The idea is to create a solution that will forecast how many inputs users have to use in their processing or production. When dealing with daily production processes, defining the optimal number or quantity of inputs is important to have a steady flow. It also reduces costs and unwanted waste if you can determine exactly how much resources you have to take in when producing certain products. Production planning is much more easier and effective if you can predict how input takers will behave or perform. External or internal influences can change the quantity and based on them and historical data, the solution can forecast a few days in advance and inform users on what amount should be released in production.


The goal was to predict the feed intake based on climate data such as humidity, and temperature. The hypothesis was that feed intake depends on those factors – cows eat less when it is hot and when high humidity. The business side of the story is as follows – if cows will eat less, do not serve them more than they could eat as the surplus of feed will be unused. The leftovers are served again, but eventually, they have to be discarded if used too many times. Some studies have shown that a bare minimum of 3 % of feeds purchased and fed to dairy cows are never eaten due to shrinkage and feed refusals.

All this means that farmers are throwing away feed which leads to increased costs on the input side of the process.

That’s why we implemented a forecasting solution that would predict the optimal amount of feed to serve each day based on several factors like milk yield, historical values, and climate data. Because the main point is to cut costs, forecasting does not need to be long-term, a few days ahead is sufficient for a farmer to plan the feed portions.


up to

$ 0
cost reduction per year

(calculation based on 7400 animals, 0.3 lb/head savings, and corn price of 0.125 $/lb)

As farms are located all over the USA, the impact of climate is different. So our models do not achieve the same performance on every farm. In general, we can say that our models can predict the optimal feed intake and save resources and money. For instance, for a 1-day-ahead prediction, the model saved 0.3 lb of feed per animal. It does not look like much, but when you consider that the average US dairy farm contains 7400 animals and that 1 lb of corn costs $0.125, it adds up to $277.5 each day – on a yearly basis it is more than $100,000!

Admired by

Ryne Braun
Ryne BraunProduct Manager,
Read More
Part of the client’s success is attributed to Digital Poirots consistent, on-the-dot delivery. The team mitigates delays by proactively communicating with subject matter experts. They also provide thorough reports that eliminate the need for lengthy back-and-forths.
Marin Kosović
Marin KosovićLead Data Scientist, Bellabeat
Read More
Digital Poirots leads a precise execution, meeting the team’s requirements. They communicate effectively, establishing a seamless workflow. They were very prompt and precise in response. Their professionalism and expertise were impressive.

Too much data?

Let's talk

Let us help you discover all the clues!

Zadarska 80, Zagreb

© 2023 |