Breast cancer is the most common type of cancer in women and the leading cause of death from a malignant growth in the world. Machine learning methods have been created to help with cancer detection accuracy. There are several methods for detecting cancer. Histopathological images are more accurate. In this study, we employed the Gabor filter to extract statistical features from invasive ductal carcinoma histopathology images. From the histopathological images, we chose 100, 200, 400, 1000, and 2000 at random. These statistical features were used to train several models to classify these images as malignant or benign, including the decision tree, quadratic discriminant analysis, extra randomized trees, gradient boosting, Gaussian process, Naive Bayes, nearest centroid, multilayer perceptron, and support vector machine. The models' accuracy, sensitivity, specificity, precision, and F1_score were examined. The models produced the highest results when there were 100 images and a wavenumber of 0.2. While as the number of images increased, the models' effectiveness reduced. The most obvious finding to emerge from this study is that we suggest using deep learning instead of machine learning models for large datasets.