0

I'm trying to discretize 274 columns in a table and run naive bayes and decision tree algorithms. How can you discretize many columns at once? My variable smalltrainv3 contains 275 columns, with the first being a factor (levels 0-9) and the being numeric.

Whenever I try to use the discretize function it tells me x must be numeric.

  • Factors are already discrete. Please show (a) a sample of your data that includes the class information, something like `dput(droplevels(smalltrainv3[1:5, 1:5]))`, (b) your expected output for that small sample input, and (c) the code you tried. – Gregor Thomas Nov 19 '19 at 02:52
  • Also, a possible duplicate [might be this question](https://stackoverflow.com/q/32100476/903061), perhaps have a look there to see if it helps. – Gregor Thomas Nov 19 '19 at 03:15

0 Answers0