To split your data into training and testing sets, you can use scikit-learn, a popular machine learning library in Python. Here's an example:
from sklearn.model_selection import train_test_split
# Assuming 'X' is your feature matrix and 'y' is your target variable
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
# Print the shapes of the training and testing sets
print("Training set shape:", X_train.shape, y_train.shape)
print("Testing set shape:", X_test.shape, y_test.shape)