Improved Pig Behavior Analysis Through Strategic Data Preprocessing Framework in Machine Learning

Pranjal Ranjan, Sanjana Bharadwaj, Yingqi Pei, Kenan Burak Aydın, Dong Sam Ha, Gota Morota, Sook Shin · 2024

This study presents a novel data preprocessing framework to enhance pig behavior analysis using machine learning techniques. We address the critical issue of data leakage in time series data, which can lead to overfitting and poor generalization in real-world applications. Our approach introduces two key innovations: a non-class-based windowing method and a chronological time sampling technique for train/test splitting. To evaluate these methods, we collected a comprehensive dataset spanning 100 hours of pig behavior over 24 days, using ear-tag sensors and video recordings to capture 12 distinct activities. We evaluate the effectiveness of our preprocessing methods using various machine learning and deep learning models on both time-domain and feature-domain datasets derived from this unique collection. Results demonstrate significant improvements in classification accuracy across all tested models, with increases of up to 15% compared to commonly used data preparation methods. The 2D Residual CNN achieved the highest accuracy of 95.6% in the time domain, while Random Forest performed best in the feature domain with 94.1% accuracy.

Read the paper · More papers on PaperTik