I am trying to implement decision tree classifier to classify my data set. I am using Python. Now it is easy to implement in scikit learn, but how can I implement this in tensorflow.
3 Answers
Basically I guess TensorFlow does not support decision trees. I quote from here,
This is a big oversimplification, but there are essentially two types of machine learning libraries available today,
Deep learning(CNN,RNN, fully connected nets, linear models) and Everything else (SVM, GBMs, Random Forests, Naive Bayes, K-NN, etc). The reason for this is that deep learning is much more computationally intensive than other more traditional training methods, and therefore requires intense specialization of the library (e.g., using a GPU and distributed capabilities). If you're using Python and are looking for a package with the greatest breadth of algorithms, try scikit-learn. In reality, if you want to use deep learning and more traditional methods you'll need to use more than one library. There is no "complete" package.
You can see from here that there are other learning algorithms implemented in TensorFlow which are not deep models.
You can take a look at here for tracking algorithms implemented in TensorFlow.
- 103
- 2
- 14,308
- 10
- 59
- 98
Similar to what I wrote on the other post, TensorFlow does in fact have implementations of Random Forest and Gradient Boosting, in addition to other non-deep learning algorithms. The links can be found at that post.
- 191
- 1
- 4
The main difference is that tensorflow is based on numerical methods (i.e., gradient descents). There is no gradient in tree-based methods. The exception is gradient regression tree.
- 21
- 1