Fine-tune random forest on time series I am using the random forest for classifing if it will rain (1) or not (0) in my daily rain dataset with a small quantity of data (8103 tuples). Currently running a walking foward evaluation looking at the recall metric and getting a mean of 83.
I'm using a multivariate approach with the following columns:

I know the RF doesn't use autoregression, so I'm looking for ways to help it understand the time property better. Also if I there is any argument I can pass to RFClassifier that would be good, I'm already using bootstrap=False.
I already tried other techniques such as ETS and ARIMA, but they could not beat mean (only STLF has beaten it actually) so I'm looking into the Machine Learning approach.
 A: You can always include lagged values of the target variable to account for autocorrelation. However, for a Boolean target, that will likely not add a lot of value. Also, much of the autoregressive behavior is probably already captured by the fact that your weather variables are already highly autoregressive (incidentally, you will need to forecast them, too).
You may want to consider Fourier transforms of day_of_year and wind_direction so your RF understands the circular nature of these predictors.
Are you training your RF on recall? If not, be aware it will likely optimize on a different loss function. Optimizing and evaluating on two different loss functions does not make a lot of sense (Kolassa, 2020), and recall is not a very good evaluation measure in any case.
A: You could give a dev package I wrote up a shot. It just wraps LightGBM (boosted trees) with some time series functionality such as fourier basis functions, 'custom' linear basis functions, and ar components.
Here is a quick example:
from sklearn.datasets import fetch_openml
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_style('darkgrid')
bike_sharing = fetch_openml("Bike_Sharing_Demand", version=2, as_frame=True)
y = bike_sharing.frame['count']
y = y[-800:].values
y_class = y > 70
y_class = y_class * 1

from LazyProphet import LazyProphet as lp
lp_model = lp.LazyProphet(seasonal_period=[24],
                      n_basis=10,
                      objective='classification',
                      fourier_order=5,
                      decay=.99,
                      ar=3,
                      return_proba=True)
fitted = lp_model.fit(y_class)
predicted_class = lp_model.predict(100)
plt.plot(y_class)
plt.plot(np.append(fitted, predicted_class), alpha=.5)
plt.axvline(800)
plt.show()


You can pass your own params such as the objective and all that through the 'boosting_params' argument.
And here is a multivariate example. It may be wonky so just let me know if there are issues.
