I have split the data but struggling to write the code for training the model and saving the model in particular directory using pickle for future use. Any suggestions on how to proceed?
# Splitting data into training and testing setsX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)from river import evaluatefrom river import forestfrom river import metricsfrom river import preprocessingmodel = ( preprocessing.StandardScaler() | forest.ARFRegressor(seed=42))metric = metrics.MAE()# Evaluate the model on the testing setmae = evaluate.progressive_val_score(X_test, y_test, model, metric)print(f'MAE on the test set: {mae}')