Recommendation deployment

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 Advantage
  • Applications that can import and export files in the PMML format

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:

  1. Right-click on a model nugget on the models palette. (Alternatively, double-click on a model nugget on the canvas and select the File menu).
  2. On the menu, click on Export PMML.
  3. In the Export (or Save) dialog box, specify a target directory and a unique name for the model.

    Note

    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.

    Recommendation deployment

To use it, we can:

  • Deliver analytical results as customer interactions occur through integration with business user systems—combining the information gathered during the interaction with historical data to determine the next best action
  • Deploy streams created in SPSS Modeler to be executed in an operational environment
  • Incorporate features that ensure scalability, reliability, and security
  • Integrate with the existing authentication systems for authentication and single sign-on capabilities
  • Support application server clustering and virtualization for a more effective use of resources
  • Create a unified platform that can increase the impact of your analytics investment with IBM SPSS Collaboration and Deployment Services for System z. This version combines the predictive analytics power of IBM SPSS Modeler and IBM SPSS Analytical Decision Management with the security, high availability, and reliability of the System z platform.

For more information on utilizing IBM SPSS Collaboration and Deployment Services, go to http://www-01.ibm.com/support/docview.wss?uid=swg27043649.

..................Content has been hidden....................

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