# Construction and Completion of the Knowledge Graph for Cow Estrus with the Association Rule Mining
## 5 Validation of Association Rules
### Iforest-OCSVM in Abnormal Estrus Prediction  
In order to test association rules for abnormal estrus determination in cow estrus, we adopted a progressive strategy based on Iforest with strong association rule weighting combined with weighted one-class support vector machine OC-SVM, to achieve efficient and robust abnormal discrimination. The framework is mainly divided into two key phases: the coarse screening phase, and the fine judgment phase. In the coarse screening stage, we utilized Iforest to perform rapid preliminary screening of the estrus data. Isolated forest can efficiently isolate anomalous samples by constructing a randomized tree structure. This method is particularly suitable for preliminary screening of large-scale data because it can narrow down the scope of anomaly detection by eliminating high-confidence normal samples in a shorter period of time. With this stage, \begin{table}
\begin{tabular}{c c c} \hline \hline \multirow{2}{*}{**Characteristics**} & **Quantification and Normal** & \multirow{2}{*}{**Unit**} \\  & **Range Units** & \\ \hline Multiples of increase in exercise & 3.0–5.0 Multiples & Multiple \\ Temperature increase & 0.5–1.2 \({}^{\circ}\)C & \({}^{\circ}\)C \\ Rumination volume & 20–40\% & \% \\ Rumination time shortening & 1.5–3.0 h & h \\ Milk yield rate of change & \(-\)15–\(+\)5\% & \% \\ Change in lying time & 0.5–2.0 h & h \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Quantitative indicators of normal estrus characteristics in cattle. we were able to significantly reduce the amount of data for subsequent processing and improve the overall detection efficiency. In the fine-tuning stage, we analyzed the suspected abnormal samples output from the isolated forest in depth. Here, weighted OC-SVM was used. OC-SVM is able to finely distinguish anomalous samples with fuzzy boundaries by constructing a maximally spaced hyperplane. This progressive strategy not only improved the efficiency of anomaly detection, but also enhanced the robustness and adaptability of the model. Different characteristics are often not equally important for the detection of abnormalities in extras studies in heifers. Some features may be decisive for the description of normal data, while others may be more prominent in the performance of abnormal data. Therefore, weighting features and constructing a weighted feature matrix can more accurately reflect the essential characteristics of the data. This study proposed an association-rule-driven feature weighting fusion method, i.e., defining feature weights based on a strong association rule of FP-Growth mining. This method could capture the synergistic effect between features more accurately, thus improving the model's sensitivity to anomalous data and its detection accuracy. Second, strong association rules can quantify the importance of features in anomaly detection. In the mining process, metrics such as the support and confidence of each rule can be used as a basis for measuring the importance of features. Rules with higher support indicate that the combination of features appears more frequently in the data and may be important for anomaly detection; rules with higher confidence indicate that the association between the combination of features and anomalies is stronger. By transforming these indicators into weights, the actual contribution of features in anomaly detection can be reflected more scientifically. The formula for defining feature weights is as follows:  
\[\mathrm{w_{i}}=\frac{\mathrm{Support(f_{i})\cdot Lift(f_{i})}}{\sum_{j=1}^{n} \mathrm{Support(f_{j})\cdot Lift(f_{j})}} \tag{5}\]  
In this formula, \(\mathrm{w_{i}}\) indicates the weight of the first feature, the value range is between [0, 1], the larger the weight, the more important the feature is in cow estrus. \(\mathrm{Support(f_{i})}\) represents the support degree of the first feature in the dataset, that is, the frequency of the feature, and a higher support degree means that the feature is more common in the data.