Breast cancer is a significant issue for women worldwide and a leading cause of death. This disease can be detected by differentiating malignant and benign tumors. As a result, physicians require a dependable diagnostic process for differentiating malignant from benign tumors. So automated detection of tumors is required. This research aims to introduce an optimized framework for identifying breast cancer types and predicting breast cancer recurrence using Seven Machine Learning algorithms: Logistic Regression (LR), eXtreme Gradient Boost (XGboost), Multi-Layer Perception (MLP) of Neural Network, Naive Bayes (NB), Random Forest (RF), K-Nearest neighbor (KNN) and Decision Tree (DT). We use Grid Search to optimize the machine learning algorithms. The performance of the framework was compared to determine which classifier performs the best on the Wisconsin datasets as follows Wisconsin Breast cancer (WBC) dataset, Wisconsin Diagnosis Breast cancer (WDBC) dataset, and Wisconsin Prognosis Breast Cancer (WPBC) data set. Our work presents a significant increase in cancer prediction accuracy, with the highest value being 98.3 % in the WBC dataset, 99.2% in the WDBC dataset, and 78.6% of accuracy in the WPBC dataset for cancer recurrence prediction. These results show significant progress in the area of breast cancer classification and recurrence prediction as compared to the existing state of art results of baseline machine learning models.