September 2017
Beginner to intermediate
412 pages
8h 55m
English
Many online vendors ask their customers to rate the products that they purchase, typically on a scale of one to five stars. We can modify our previous Recommender2 program to incorporate these numerical ratings. To test the new version, we'll also modify our DataGenerator and Filter programs.
The modified DataGenerator program is shown in Listing 9.18:

Listing 9.18: Program to generate random ratings
(The folded code is the same as in the DataGenerator1 program in Listing 9.2.) It creates random ratings from the set {1.0, 1.5, 2.0, 2.5, …, 5.0} that are normally distributed with mean 3.0 and standard deviation 1.0.
The only ...
Read now
Unlock full access