the -squared value turns out to be which isn' too surprisingbecause we trained it on the training data the test data is sort of its unknownits testand it did fail the testquite frankly %that' an fso this has been an example where we've used train/test to evaluate supervised learning algorithmand like said beforepandas has some means of making this even easier we'll look at that little bit laterand we'll also look at more examples of train/testincluding kfold cross validationlater in the book as well activity you can probably guess what your homework is so we know that an th order polynomial isn' very useful can you do betterso want you to go back through our exampleand use different values for the degree polynomial that you're going to use to fit change that to different values and see if you can figure out what degree polynomial actually scores best using train/test as metric where do you get your best -squared score for your test datawhat degree fits herego play with that it should be pretty easy exercise and very enlightening one for you as well so that' train/test in actiona very important technique to have under your beltand you're going to use it over and over again to make sure that your results are good fit for the model that you haveand that your results are good predictor of unseen values it' great way to prevent overfitting when you're doing your modeling bayesian methods concepts did you ever wonder how the spam classifier in your -mail workshow does it know that an -mail might be spam or notwellone popular technique is something called naive bayesand that' an example of bayesian method let' learn more about how that works let' discuss bayesian methods we did talk about bayestheorem earlier in this book in the context of talking about how things like drug tests could be very misleading in their results but you can actually apply the same bayestheorem to larger problemslike spam classifiers so let' dive into how that might workit' called bayesian method