Setting up decision variables

Next, we're going to utilize the predict method and pass in the test data. We will call our decision tree, which has been trained with our historical data, and we will call predict, which is a built-in method that the decision tree gem provides. This will allow us to pass in the argument of the test data and compare it with the data it's been compared against, then it will give us a prediction. The code will look like this:

decision = dec_tree.predict(test)  
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.204.201