RandomForest icon indicating copy to clipboard operation
RandomForest copied to clipboard

running error

Open Yan-echo opened this issue 6 years ago • 1 comments

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.

Yan-echo avatar May 27 '19 13:05 Yan-echo

The code is written by python2.7, for python3 replace by features = random.sample(df.columns.values[:-1].tolist(), int(math.sqrt(m - 1)))

zhaoxingfeng avatar Jun 07 '19 09:06 zhaoxingfeng