Death from cancer is one of humanity's biggest problems, though there are many ways to stop its occurrence because there is still no cancer cure. The death rate from breast cancer is increasing significantly with the rapid growth of the population; thus, effective diagnosis of cancer is significant. Cancer of the breast is one of the major cancer-related deaths amongst women globally. Survival rates differ across the numerous health treatments. Therefore, data analysis approaches employed to detect and treat breast cancer have to be improved to facilitate quick treatment and achieve more reliable outcomes. This study conducted a comparative analysis of machine learning techniques for breast cancer detection. This study was analyzed using Wisconsin datasets from an online UCI machine-learning repository. First, feature selection was carried out through the Particle Swarm Optimization algorithm (PSO); this algorithm helped pick relevant features from the raw dataset to eliminate and reduce noises for a better outcome, and then a reduced dataset was achieved. Three machine learning algorithms for classification were used, namely: support vector machine (SVM), artificial neural networks (ANNs), and decision tree (DT), for classification purposes, and these classifiers were used to analyze the reduced dataset to simulate the model. The performance metrics used for evaluating the model include precision, sensitivity, specificity, accuracy, F-score, false acceptance rate, error rate, and false-rejection rate. The model was simulated using Matlab 2015 version. The result from the evaluation phase in terms of performance metrics reveals that ANNs achieved the highest accuracy, sensitivity, precision, and F-score, and recall of 97.13%, 99.10%, 96.49%, 97.77%, and 99.09% respectively, and ANN also produced the lowest false acceptance rate, error rate, and false rejection rate of 0.0450, 0.0666 and 0.0090 respectively.