C4.5 icon indicating copy to clipboard operation
C4.5 copied to clipboard

Reset the dataframe indices of the input dataframes before running

Open ghvanbree opened this issue 9 months ago • 0 comments

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!

ghvanbree avatar Sep 19 '23 17:09 ghvanbree