The way of implementing the machine learning results for this project as required by the customer is to use them to make new movie recommendations when new movies come in or new users come in. One example of this typical use is to make movie recommendations for new users, which is what we will discuss in this section.
To make recommendations for a new user, we need to learn this new user's taste by asking the user to rate a few movies, for which we need to select a small set of movies that received the most ratings from users in our movie dataset.
Once we have the data of new users, then we can apply the trained model for new predictions, which can be obtained via the following code:
class MatrixFactorizationModel(object): def predictAll(self, usersProducts): # ... return RDD(self._java_model.predict(usersProductsJRDD._jrdd), self._context, RatingDeserializer())
After we get all the predictions, we can list the top recommendations, and we will see an output that will be similar to the following:
Movies recommended for you: 1: Saving Private Ryan (1998) 2: Star Wars: Episode IV - A New Hope (1977) 3: Braveheart (1995) ……
If we are working within IBM SPSS Modeler, we can just add a new Node with the data imported to complete the prediction.
Also, IBM® SPSS® Modeler provides a number of mechanisms to export the entire machine learning workflow to external applications so that the work completed here can be used to your advantage outside of IBM SPSS Modeler as well.
The IBM SPSS Modeler streams can also be used in conjunction with:
IBM SPSS Modeler can import and export PMML, making it possible to share models with other applications that support this format, such as IBM SPSS Statistics. To do so, you need to:
For more details about handling missing values with SPSS Modeler 17.0, refer to Chapter 7 of the Modeler 17.0 guide at ftp://public.dhe.ibm.com/software/analytics/spss/documentation/modeler/17.0/en/ModelerUsersGuide.pdf.
For more information on utilizing IBM SPSS Collaboration and Deployment Services, go to http://www-01.ibm.com/support/docview.wss?uid=swg27043649.
18.223.108.119