0

I am new to machine learning and have mostly been using python's sklearn to create classification models on various data sets (iris data set etc). I have also been watching videos/tutorials which explain the underlying principles involved.

I want to know is there any way to see "under the hood" on the python sklearn algorithms. For example, I have created a decision tree classifier using sklearn and would like to see the exact structure of the tree created. Is this possible or will I need to write/develop my own algorithms from scratch?

Sjoseph
  • 853
  • 2
  • 14
  • 23
  • 1
    Do you mean you want to print the decision tree: https://stackoverflow.com/questions/25274673/is-it-possible-to-print-the-decision-tree-in-scikit-learn – EdChum Aug 31 '17 at 13:21
  • 1
    [Docs](http://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeClassifier.html#sklearn.tree.DecisionTreeClassifier): attributes: ```tree_: The underlying Tree object.``` – sascha Aug 31 '17 at 13:21
  • @EdChum, yes that is exactly what I want, thank you. I am left with the same issue though as the asker of that question as tree.dot is a list object – Sjoseph Aug 31 '17 at 14:33

0 Answers0