# Does Tensorflow support a Decision Tree Classifier?

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.

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.

• I'm torn on this: I'm aboard with the reasoning of your quote, but on the other hand: Random Forrest is a kind of tree learner. – S van Balen Feb 20 '18 at 13:19
• @SvanBalen I don't understand what you mean. – Media Feb 20 '18 at 13:57
• Tensorflow supports random forrest (as documented by the link you gave), random forrest is a special kind of tree learner. So even though Tensorflow doenst seem to support common learners (CART or C45) and even though it is primarily a library for deep learning, and even though I too would use sklearn, it technically supports a tree learner, making your statement false. – S van Balen Feb 20 '18 at 14:06
• @SvanBalen I thank you if I really have made a mistake for announcing me but I don't know where I'm wrong. I've said TensorFlow does not support decision trees, which is really the case. Which part I'm wrong? – Media Feb 20 '18 at 14:10
• TF supports random forest, random forest is a decision tree (a specific type at that), hence TF supports decision trees. But like I said: I'm torn at whether your statement is wrong: Technically it is, but for all practical purposes it is not. – S van Balen Feb 20 '18 at 14:26

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.