I ran into an issue when doing cross-validation with TimeSeriesSplit on my big unbalanced time-series data set
As my Y is 98.1% composed of the same class, when doing the TimeSeriesSplit it is not possible to guarantee that in every interaction I have 2 or more classes.
ValueError: Training data only contain information about one class.
That is, the frequency of values different from this majority class in Y is so low that when doing a cross validation on a rolling basis, as shown in the image below, I don't have enough classes to cross-validate.
Are there any other suggestions for me to do the validation process of a strongly unbalanced time series? Additionally, as it is a time series, I cannot use k-fold based cross-validation, for example.
