Clear Sky Science · en

Machine learning models for crude protein prediction in Tamani grass pastures

· Back to index

Why smart pastures matter for your dinner plate

Beef and milk start with grass. Around the world, billions of hectares of pasture feed cattle, sheep, and other grazing animals. For these animals to grow well and stay healthy, their grass must contain enough protein, a key building block of muscles, milk, and vital organs. But measuring protein in grass usually means cutting samples and sending them to a lab—slow, costly work that most farmers cannot do often. This study explores how simple field measurements, combined with modern computer techniques, can estimate grass protein quickly and cheaply, helping farmers fine‑tune grazing and fertilizing while using fewer resources.

A closer look at a tropical workhorse grass

The researchers focused on Tamani grass, a productive tropical grass widely used in Brazil for intensive grazing. Over 18 months, they monitored a 0.96‑hectare pasture divided into small paddocks and exposed it to two levels of nitrogen fertilizer and two grazing strategies based on how much light the plants intercepted. They recorded easy‑to‑obtain information: seasons of the year, temperature, rainfall, sunlight, the time each paddock rested between grazings, and the grass height before and after animals grazed. At the same time, they took a limited number of leaf samples and used a specialized optical method to measure crude protein, building a small but detailed dataset that linked day‑to‑day management to grass quality.

Figure 1
Figure 1.

Teaching computers to read the pasture

Instead of relying on satellite images or drones, which demand special equipment and computing power, the team used only “tabular” data—the kind you might see in a spreadsheet. They tested five different machine‑learning approaches, which are computer methods that learn patterns from examples: a standard straight‑line model, a basic decision tree, a neural‑network style model, and two popular tree‑based methods that combine many simple models into a stronger one. They trained these models on 80 percent of the measurements and kept the remaining 20 percent for testing. The goal was simple but practical: given information a farmer can easily record—fertilizer rate, rest period, grass height, and basic weather—could a computer predict how much protein is in the leaves?

How management choices shape protein levels

The models revealed that the way pastures are managed matters more for protein content than the weather conditions recorded in this study. Among all the factors, the time between grazings came out on top: longer rest periods led to older, more fibrous plants with lower protein, while shorter intervals helped maintain younger, leafier grass richer in protein. Nitrogen fertilizer also played a major role, because nitrogen is a core ingredient of plant proteins and chlorophyll. Grass height before and after grazing ranked next in importance, tying protein levels to how tightly animals are allowed to graze. Rainfall, temperature, sunlight, and seasonal labels still had some effect, but they were less influential than these everyday management decisions.

Figure 2
Figure 2.

How accurate were the computer predictions?

The best‑performing methods were two advanced tree‑based models. One called Random Forest and another known as XGBoost produced similar correlations between predicted and observed protein values, meaning their estimates tended to rise and fall in step with reality. XGBoost performed slightly better overall, explaining a bit more than half of the variation in protein content and keeping average prediction errors around one and a half percentage points. While this is not perfect, it is accurate enough to be useful for many management decisions, especially given that it relies only on information most farms can already record with basic tools and a notebook or simple app.

What this means for farmers and food consumers

To a lay reader, the message is straightforward: by paying close attention to how long pastures rest, how tall the grass is when animals enter and leave, and how much nitrogen fertilizer is applied, farmers can steer the protein content of their grass in the right direction. This study shows that affordable, easy‑to‑collect measurements, combined with smart algorithms, can provide fast estimates of grass protein without constant lab work or expensive sensing equipment. If future research with larger and more varied datasets confirms these results, such tools could help farmers produce more meat and milk with fewer inputs, lower costs, and better environmental outcomes—benefits that ultimately reach consumers through more efficient and sustainable livestock production.

Citation: Oliveira de Aquino Monteiro, G., dos Santos Difante, G., Baptaglin Montagner, D. et al. Machine learning models for crude protein prediction in Tamani grass pastures. Sci Rep 16, 5805 (2026). https://doi.org/10.1038/s41598-026-36949-6

Keywords: pasture management, forage quality, machine learning, crude protein, precision livestock farming