Cardiovascular diseases (CVDs) are a prevalent cause of heart failure around the world. This research was required in order to investigate potential approaches to treating the disease. The article presents a focal loss (FL)-based multilayer perceptron called MLP-FL-CRD to diagnose cardiovascular risk in athletes. In 2012, 26,002 athletes were measured for their height, weight, age, sex, blood pressure, and pulse rate in a medical exam that had electrocardiography at rest. Outcomes were negative for the largest majority, leading to class imbalance. Training on imbalanced data hurts classifier performance. To address this, the study proposes a training approach based on focal loss, which effectively emphasizes minority class examples. Focal loss softens the influence of simplistic samples, enabling the model to concentrate on more intricate examples. It is useful in circumstances when there is a substantial class imbalance. Additionally, the paper highlights a challenge in the training phase, often characterized by the use of gradient-based learning methods like backpropagation. These methods exhibit several disadvantages, including sensitivity to initialization. The paper recommends the implementation of a mutual learning-based artificial bee colony (ML-ABC). This approach adjusts the primary weight by substituting the food resource candidate, which is selected due to superior fitness, with one based on a mutual learning factor between two individuals. The sample obtains great outcomes, outperforming other machine learning samples. Optimal values for important parameters are identified for the model based on experiments on the study dataset. Ablation studies that exclude FL and ML-ABC of the sample confirm the additive effect of, which is not negative and dependent, these factors on the sample's efficiency.