We are performing a classification predictive modeling which involves assigning a class label (Defective or OK) for a given image of casting product.To prevent the model from making a biased prediction, the dataset must be checked for class imbalance.