RandomForest
RandomForest copied to clipboard
running error
features = random.sample(dataSet.columns.values[:-1], int(math.sqrt(m - 1))) TypeError: Population must be a sequence or set. For dicts, use list(d). What should I do? Thank you.
The code is written by python2.7, for python3 replace by features = random.sample(df.columns.values[:-1].tolist(), int(math.sqrt(m - 1)))