*3.1. Data Processing*

The raw data set for the sensor contains 98 cattle of various breeds and genders. There are eight categories used to classify cattle's status: Resting, Rumination, High Activity, Medium Activity, Panting (Heavy Breathing), Grazing and Walking. Detailed descriptions for different cattle states are shown in Table 1. Each sensor takes a minute-by-minute reading of the cows' real-time status, with each cow having 74,455 data points collected between AU\_time 8:06 a.m. on August 10 and 1:01 a.m. on 1 October 2019. Five cattle breeds are represented in the data sets: Angus, Brahman, Brangus, Charolais and Crossbred. This section focuses on the systematic processing of these data, including data segmentation, data cleaning, and data calculating.


**Table 1.** The explanation of the state.

## 3.1.1. Data Segmentation

The first step in data processing is the segmentation. The data are grouped by cattle of the same sex and breed. Because the original data are massive, we segmen<sup>t</sup> the data using RStudio and R programming language. Table 2 shows the number of cows segmented and integrated. A vast amount of data facilitates the analysis of overall data characteristics and avoid errors caused by individual and particular data. As a result, the resting state of Brahman's Female is used to demonstrate data processing and prediction.

**Table 2.** The number of cattle of different breeds and genders.

