1

I am working on a machine learning, my data is unbalanced so I am trying to use SMOTE to balance them. However, one column is a datetime64. I have tried with datetime64[ns] as well but I get the same error.

TypeError: The DType <class 'numpy.dtype[datetime64]'> could not be promoted by <class 'numpy.dtype[float64]'>.

Can this be fixed? is there a better way to balance my test data if it has a datetime object?

from imblearn.over_sampling import SMOTE
sm = SMOTE(random_state = 42, sampling_strategy = 1.0)
X_dep_train, y_dep_train = sm.fit_resample(X_dep_train, y_dep_train)
Barbara Gendron
  • 385
  • 1
  • 2
  • 16

0 Answers0