Artificial Intelligence, Data Science, Machine Learning, Technology, Algorithms.
random_state=42) # Split the dataset into train and test sets X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42) # Print the class distribution before oversampling print("Before oversampling:", Counter(y_train)) # Before oversampling: Counter({0: 7192, 1: