Machine Learning in Excel With Python
We start with a function to get the decision tree. The user will call this to get the decision tree object, and then pass that result into subsequent functions to make predictions. Here we will construct it again, but for more complex examples we could train the model offline and save the trained model (using "pickle" for example) and then load that instead of recreating it. Creating the model in Excel gives us the possibility to play with some of the training parameters, which is fun. The code above is the same as the code we saw previously for training the decision tree, except for the @xl_func decorator.
Nov-16-2018, 16:00:10 GMT
- Technology: