Breast cancer is a class of cancer that starts in the cells of the breast. It happens once the cells of the breast divide and amplify abnormally and uncontrollably. Other parts of the body, including lymph nodes, bones, lungs, and liver, can be affected by breast cancer. Early diagnosis and treatment are critical in helping to lessen the risk of death from breast cancer. Machine learning is a type of artificial intelligence that can be used to diagnose breast cancer. It uses algorithms to analyze data and assess patterns associated with breast cancer. Machine learning models can help improve diagnostic accuracy, reduce false-positive results, and improve the efficiency of diagnosis. Elman Neural Networks (ENNs) are machine learning algorithms that can be used to diagnose breast cancer. ENNs use medical data to detect patterns that are associated with the presence of cancer. The accuracy of ENNs in diagnosing breast cancer is still being researched, but they have the potential to help improve diagnostic accuracy and reduce false-positive results. In the existing study, a new modified version of ENN founded on a combination of an upgraded version of the imperialist competitive algorithm is proposed for this objective.Likewise, the results of the model compared with some other methods illustrated the proposed method's higher efficiency.