In recent years, the usage of mobile devices has considerably helped the spread of Human Activity Recognition (HAR) investigations. Researchers like it because of its flexibility, low cost, small size, ease of use, and wide variety of potential applications. In recent years, conventional, biological, and control-based technologies have all been developed for humanoid robot mobility. This study focuses on improving the suggested approach, which differs from earlier articles. This is accomplished through the utilization of the publicly accessible Human Activity Gait (HAG) data collection, which documents a wide range of activities. To establish how best to use these data, many experiments were carried out using several machine-learning algorithms, each with its own set of hyper-parameters. In this article, we used an ensemble machine learning model for the classification of activities and Cuckoo Search Optimizations for the best feature. This ensemble model consists of Logistic Regression, K-Nearest Neighbors, and Decision Tree.