i want to build decision tree classifier, and i have no idea how to extract feature from text (my file is text) can anyone help me? is BOW, N-gram orTF-IDF useful?

  • 1
    $\begingroup$ This seems a bit under-specified. Without knowing what sort of text you want to process, we won't have a better idea that you on what sort of method is suitable. $\endgroup$ – Discrete lizard Apr 1 '19 at 20:33

This depends on your application but the trend is to use Deep Learning. That is, allow the algorithm to learn the features as opposed to do feature engineering (e.g. choose between BOW, n-gram etc).

See for example this paper (Gender Classification with Deep Learning by Aric Bartle, Jim Zheng) where they compare the performance of BOW/n-gram/vs Deep Learning via Recurrent Convolutional Networks. Deep Learning generally outperforms classic feature engineering.


| cite | improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.