4 thoughts on “[Activity] Decision Trees: Predicting Hiring Decisions”

  1. voxpopus says:

    Found an error in the code for this:
    –> 2 from sklearn.externals.six import StringIO
    raises an error message which goes away and then runs OK if you replace with:
    from six import StringIO

  2. Frank Kane says:

    Thanks for catching that… it must have changed in a recent Anaconda update. I’ll upload a corrected notebook to the course materials in a minute.

  3. voxpopus says:

    How do we “save” a tree model for ongoing, future use?
    You gave an example of using “predict” inside the code for new data.
    How can we save that model and then call predict with new data, maybe even from a regular Python window?

    Thanks for the great courses.

    1. Frank Kane says:

      There’s no special way to do it; you’d just “pickle” the model to store it as you would with any Python object, and then reload it. There’s an example at https://stackoverflow.com/questions/26139826/save-a-decision-tree-model-in-scikit

Leave a Reply