howeverwe do have to be careful to not overfit our dataset in factif we randomly try too many thingssome of them will work well on this dataset but will not generalize even though we are using cross-validationwe are not cross-validating our design decisions in order to have good estimateand if data is plentifulyou should leave portion of the data untouched until you have your final model that is about to go into production thentesting your model gives you an unbiased prediction of how well you should expect it to work in the real world basket analysis the methods we have discussed so far work well when you have numeric ratings of how much user liked product this type of information is not always available basket analysis is an alternative mode of learning recommendations in this modeour data consists only of what items were bought togetherit does not contain any information on whether individual items were enjoyed or not it is often easier to get this data rather than ratings data as many users will not provide ratingswhile the basket data is generated as side effect of shopping the following screenshot shows you snippet of amazon com' web page for the book war and peaceleo tolstoywhich is classic way to use these resultsthis mode of learning is not only applicable to actual shopping basketsnaturally it is applicable in any setting where you have groups of objects together and need to recommend another for examplerecommending additional recipients to user writing an -mail is done by gmail and could be implemented using similar techniques (we do not know what gmail uses internallyperhaps they combine multiple techniques as we did earlierorwe could use these methods to develop an application to recommend webpages to visit based on your browsing history even if we are handling purchasesit may make sense to group all purchases by customer into single basket independently of whether the items where bought together or on separate transactions (this depends on the business context