C4.5
C4.5 copied to clipboard
Reset the dataframe indices of the input dataframes before running
Hi,
Not a big issue, but just wanted to share that you might need to reset the dataframe indices (of Xdata and ydata) before entering them into dt_c45(). The indices caused the following error for me:
TypeError: '<' not supported between instances of 'float' and 'str'
referring to:
244 if len(np.unique(branch[i][0])) == 1 or len(branch[i]) == 1:
After resetting the indices, using df.reset_index(drop=True)
, the function works. Thanks!