In the highly competitive landscape of academia, the study addresses the multifaceted challenge of analyzing voluminous and diverse educational datasets through the application of machine learning, specifically emphasizing dimensionality reduction techniques. This sophisticated approach facilitates educators in making data-informed decisions, providing timely guidance for targeted academic improvement, and enhancing the overall educational experience by stratifying individuals based on their innate aptitudes and mitigating failure rates. To fortify predictive capabilities, the study employs the robust Extra-Trees Classifier (ETC) model for classification tasks. This model is enhanced by integrating the Gorilla Troops Optimizer (GTO) and Reptile Search Algorithm (RSA), cuttingedge optimization algorithms designed to refine decision-making processes and improve predictive precision. This strategic amalgamation underscores the research's commitment to leveraging advanced machine learning and bio-inspired algorithms to achieve more accurate and resilient student performance predictions in the mathematics course, ultimately aiming to elevate educational outcomes. Analyses of G1 and G3 showcase the efficacy of the ETRS model, demonstrating 97.5% Accuracy, F1-Score, and Recall in predicting the G1 values.Similarly, the ETRS model emerges as the premier predictor for G3, attaining 95.3% Accuracy, Recall, and F1-Score, respectively. These outcomes underscore the significant contributions of the proposed models in advancing precision and discernment in student performance prediction, aligning with the overarching goal of refining educational outcomes.