Integrating SPSS predictive analytics into Business Intelligent applications, Part 1: Integrating SPSS Modeler and Collaboration and Deployment Services

In this article, you'll learn how you can use IBM® SPSS® predictive analytics to make better decisions using a sample insurance quotation scenario. Using SPSS Modeler and SPSS Collaboration and Deployment Services, you'll learn how to integrate an SPSS scoring service and automated model refreshing into an existing enterprise environment. This content is part of the IBM Business Process Management Journal.

Share:

Andrew Flatt, Software Developer, IBM

Andrew Flatt photoAndew Flatt works on an internal integration test project. The purpose of the project is to test that multi-product scenarios can be successfully deployed into a cross-platform environment that includes both distributed platforms (AIX, Linux and Windows) and z/OS. The project focuses on both cross-product and cross-platform integration and on consumability. Andrew aims to act as much as possible like a real customer to ensure that the testing we perform is relevant to real-world usage of the products being tested.



29 September 2011

Introduction

This article discusses the use of business analytics to predict the likelihood of future events based on past performance. The predictions can then be used to make faster, more informed decisions. It is important that predictions be adaptable and dynamic to new business information so that they can reflect the most up to date information available.

Rule-based classification systems are designed and updated for a view of the business at a point of time. As soon as they are created, they become progressively out of touch with the current business. Using analytics in conjunction with existing rule systems allows for automatic adaptation to the changing factors in the business.

Our motivation as an integration test team was to introduce analytics into our home insurance solution environment. With SPSS analytics, you were able predict whether a customer was high risk by predicting whether the customer was likely to claim. Our insurance solution uses a JRule to perform a real-time quotation on a policy. We integrated IBM ILOG® JRules® and SPSS because we wanted a mathematical prediction of risk to combine with business-intelligent rules to provide real-time quotes. This article uses this scenario to show how to set up predictive analytics in an enterprise environment.

What is a predictive model?

A predictive model is the structure and process used to generate a prediction. A model is created by processing existing business data for common links and segments towards a specified target value. For example, a model can be created using information from a view of the current customer base. In the view there would be a target value, such as whether a customer is a high or low risk.

What is scoring?

Scoring is an action in which business analytics is used to generate a value. An example of a value would be a prediction in which a customer is scored as either high or low risk. The prediction is generated by supplying a predictive model with input data. In this example, the input data would be information about the customer.

Why use scoring in an enterprise?

There are many real world examples where scoring could potentially be used in enterprise applications. This article will follow the scenario of scoring an insurance customer.

Here are a few other scenarios where scoring a customer could benefit decision-making in an enterprise application.

  • Accessing a customer's risk

    Similar to the insurance quotation system, potential customers are scored either low or high risk when defaulting on loans. This score can then be used as additional input to calculate the loan approval. This could be useful as the scoring could use additional information about the current customer base to attempt to find links between existing defaulting customers.

  • Direct marketing

    A marketing tool that uses rules to target campaigns to match a particular customer and then uses a the scoring system to find out which method of communication the customer is most likely to respond to (such as SMS, email or post). The goal of the predictive analytics is to lower the cost per order or cost per action.

  • Classify customer usage

    Classify customers into segments of service usage patterns, using the pattern to predict group membership. A decision flow will then identify the correct offers for that customer. This would increase customer satisfaction and lower costs per order.

  • Cross-sell

    A cross-sell tool that uses scoring to identify product areas of interest to a customer and rules to check for products on offer to cross-sell. This can lead directly to higher profitability per customer and strengthening of the customer relationship. The predictive analytics side could analyze the customers’ spending, usage and other behaviors, and help cross-sell the right product at the right time.

Prerequisites

Before getting started, you need to install and configure the following software:

  • IBM SPSS Modeler 14.1 with the Enterprise View plug-in
  • IBM SPSS Collaboration and Deployment Services 4.2 Server with correct version of the Modeler Adapter
  • IBM SPSS Collaboration and Deployment Services Deployment Manager 4.2
  • IBM DB2®.

Once installed, you should familiarize yourself with the basics of these products and run through the tutorials provided in the help documentation.


The scenario and the design

Our scenario is an existing insurance quotation system that uses rules to price a policy. We want to use analytics to assist in the pricing of a policy by scoring customers as either high or low risk. Predictive analytics in this scenario are used to streamline the process of customer acquisition by predicting the future risk behavior of a customer and lead to informed pricing decisions to mitigate future risk.

To do this, we need to use profiling and segmentation to determine the historic behavior of a group. This will then allow for the prediction of future behavior of a particular customer, and the prediction will be used as additional input to effect the pricing of policies.

This article explains how to incorporate predictive scoring in an enterprise environment.

The quotation web service uses an ILOG JRule to price the policy. The rule is executed in the execution server, which is triggered by the web service. In this article, we'll set up the predictive analytics.

Figure 1. Figure 1. Rule-based quoting solution design
Rule-based quoting solution design

We can use SPSS to implement the capability to look at our current customer base and create a scoring model that can be used to score customers on whether they are likely to make a claim. The model will be refreshed with the latest business data on a schedule and a scoring web service is provided for applications to use.

Figure 2 shows how the different artifacts we are going to create link together. In Collaboration and Deployment Services, tables are imported from the DB2 database. All the tables that are used in the enterprise are included in the enterprise view. For each application that accesses the data in the enterprise view, we provide an application view. An application view contains a subset of data from the enterprise view. This allows the application view to provide only the required data for the application.

To allow for SPSS Modeler to use the tables in the application view, we need to provide two data providers: one for training the model and the other for operational use of the model. Once we have created the SPSS Modeler stream and model, we deploy it as a scenario to SPSS Collaboration and Deployment Services. SPSS Collaboration and Deployment Services provide enterprise-level centralized, secure and auditable storage of the analytical artifacts. The artifacts are then made available to the enterprise by providing access to files, jobs, web services and URLs. We use the scenario in Collaboration and Deployment Services to provide a scoring using a scoring configuration, and we refresh the model using the latest business information by using a scheduled model refresh job. The scoring service can then be leveraged by any client application. This means that the scoring results from the deployed model can be delivered in real-time when providing a policy quote to a customer.

Figure 2. Figure 2. SPSS scoring design
SPSS scoring design

Prepare your environment

Before you can implement the design, you need to prepare the environment so that business data and SPSS Collaboration and Deployment Services views are defined and ready to be used to create a model.

Create and load the DB2 database

SPSS Collaboration and Deployment Services supports many types of databases. In this article, we'll set up a DB2 database that contains four tables and one view, a simple view of data that a home insurance company keeps, as follows:

  • Policy – Table containing all the insurance policies
  • Quote – Table containing all the quotes given to customers
  • Customer – Table containing customer contact information
  • Claim – Table containing claims made by customer
  • Claimed – View containing information about which customers have claimed or not and the policy details of those claims

We will be using the claimed view to train a model to whether a customer is likely to claim or not. The view contains eight fields.

  • CLAIMMADE – A flag to show whether a claim was made on the policy or not
  • HOUSEBEDS – The number of bedrooms in the customer's house
  • CONTENTSVALUE – The value of the insured contents of the customer's house
  • HOUSETYPE – A code for the type of house
  • BACCIDENTALDAMAGE – Whether the policy covers accidental damage
  • POLICYTYPE – Three types of policy: A = Buildings & Contents, B = Buildings Only or C = Contents Only.
  • PROPERTYVALUE – Value of the property
  • CACCIDENTALDAMAGE – The amount of accidental damage coverage

To create and load the databases, do the following:

  1. This step only needs to be done once to create the database. Enter the following command from the DB2 command line processor (CLP):
    	create database hminsur using codeset 'IBM-1252' territory 'GB'
  2. Copy the DB2_HMINSUR_Dist.zip file, provided in the Downloads section, to a temporary directory on the DB2 machine and unzip it. The zip file contains the following files:
    • DB2_HMINSUR_Dist.ddl
    • CUSTOMER.txt
    • CLAIM.txt
    • POLICY.txt
    • CLAIM.txt
  3. Edit DB2_HMINSUR_Dist.ddl and set the <db2User> name on the connect statement to a DB2 user authorized to create tables and views in your DB2 environment. To do this, edit the paths specified on the import load data statement in the Preload tables with sample data section to the temporary directory to which you copied the files in the previous step.
  4. Create and load the database tables by running the script with the command:
    db2 -tf <path>/DB2_HMINSUR_Dist.ddl

Note: If you need to rerun the script, edit the DB2_HMINSUR_Dist.ddl and uncomment the drop table statements.

Prepare SPSS Collaboration and Deployment Services

To prepare SPSS Collaboration and Deployment Services, you need to set up the logical and physical links between the data in the database and the data used in the enterprise and in the application. First, add the Collaboration and Deployment Services server to the Deployment Manager.

  1. Open Deployment Manager.
  2. Click File => New => Content Server Connection.
  3. Specify the connection name, host name and port for your Collaboration and Deployment Services server.
  4. Click Finish.
  5. Right-click Collaboration and Deployment Services definition in the Content Explorer and select Log on as.
  6. Enter your log-in information and click OK.

Create resource definitions

Next you will create the resource definitions so that you can provide access to the database, SPSS Modeler server and Collaboration and Deployment Services server.

  1. Expand Resource Definitions, right-click Credentials, and select New => Credentials Definition.
  2. Specify the name DB2 and click Next.
  3. Provide the DB2 user ID and password.
  4. Set the Security Provider to Local User Repository, and click Finish.
  5. Repeat steps 2-6 for the Modeler Server and Collaboration and Deployment Services Server credentials.
  6. Right-click Data Sources in the Content Explorer, and select New => Data Source Definition.
  7. Enter the Database Name and select JDBC, then click Next.
  8. To find out the possible inputs for this panel, click the help icon and open the topic "Specifying a JDBC name and URL" and check for supported "SPSS inc. Drivers." Or, follow the instructions in the "Third-party JDBC Drivers" topic.

    For example, if you are using a DB2 V10 z/OS subsystem with a database name of DSNV10DB, take the DB2 drivers (db2jcc.jar, db2jcc_javax.jar and db2jcc_lience_cisuz.jar) and follow the instructions in the "Third-party JDBC Drivers" topic, specifying the following inputs:

    • JDBC Driver Name: com.ibm.db2.jcc.DB2Driver.
    • JDBC Driver URL: jdbc:db2://<host>:<port>/DSNV10DB.
  9. Click Finish.
  10. Right-click Data Sources in the Content Explorer, and select New => Data Source Definition.
  11. Enter the Database Name and select ODBC, and click Next.
  12. Ensure that the DSN matches the DSN that was set up when installing the Enterprise View plug-in into the SPSS Modeler Server, and click Finish.
  13. Right-click Servers in the Content Explorer, and select New => Server Definition.
  14. Enter the name Collaboration and Deployment Services and select the type Content Repository Server, then click Next.
  15. Enter the Collaboration and Deployment Services server host and port, and click Finish.
  16. Right-click Servers in the Content Explorer, and select New => Server Definition.
  17. Enter the name Modeler and select the type Modeler Server, then click Next.
  18. Enter the Modeler Server host, port and data directory, and click Finish.

It is also useful to organize the content repository for easy browsing. This is done by creating folders for each type of content you are going to create, as follows:

  1. Right-click Content Repository in the Content Explorer, and select New Folder.
  2. Name the folder Application Views.
  3. Repeat to create folders named Data Definitions, Jobs and Scenarios. It's also a good idea to create an archive folder for resources you want to keep for reference.
  4. Verify that your Content Explorer looks like Figure 3.
    Figure 3. Figure 3. Content Explorer after preparation
    Content Explorer View after preparation

Create the enterprise view

To create the enterprise view, complete the following steps:

  1. Double-click Enterprise View to open it.
  2. Click Add Table, and specify the name TrainingData.
  3. Check Select columns from a physical table.
  4. Fill in the JDBC and credential data fields with your predefined data source and DB2 credentials.
  5. Click Connect, then click Next.
  6. Click Table Types.
  7. Check VIEW and uncheck TABLE.
  8. In the drop-down menu, select HMINSUR.CLAIMED.
  9. Select the columns that will be used to train the predictive model. A list of columns in the view are displayed. Ensure that all the columns are checked except CLAIMS and POLICYID, then click Finish.
  10. Click Add Table.
  11. Specify the name OperationalData.
  12. Check Select columns from a physical table.
  13. The JDBC and credential fields should already populated. Click Next.
  14. In the drop-down menu, select HMINSUR.QUOTE.
  15. Select the columns that will be used as input to the operational predictive model. This time uncheck CUSTOMERID, PREMIUM, QUOTEID, QUOTETIME, STARTDATE and STORED, then click Finish.
  16. Save the enterprise view.

Create the application view

To create the application view, complete the following steps:

  1. Right-click the Application Views folder and click New => Application View.
  2. Enter the name RiskScoringView, and click Finish.
  3. In the application view, select each table and check all of the columns.
  4. For neatness, on the TrainingData table click the CLAIMMADE column last. Its index should be 8, so that it appears as the last column because it will be the target predicted value.
  5. Save the application view.

Create the data providers

To create the data providers, complete the following steps:

  1. Right-click the Data Definitions folder and select New => Data Provider Definition.
  2. Enter the name AnalyticDPD, and click Next.
  3. Select RiskScoringView and check Analytic.
  4. Select the JDBC and ODBC data sources.
  5. Select the DB2 credentials and click Finish.
  6. In the data provider view, click on the TrainingData table.
  7. Click Table Types.
  8. Check VIEW and uncheck TABLE.
  9. From the drop-down, select HMINSUR.CLAIMED, and click OK.
  10. The fields should be automatically mapped and you should see a green tick beside the TrainingData table.
  11. Repeat these steps for the OperationalData table, but map it to the table HMINSUR.QUOTE.
  12. Click Validate to ensure the data provider is valid, then save the data provider.
  13. Right-click the Data Definitions folder and select New => Data Provider Definition.
  14. Enter the name OperationalDPD, and click Next.
  15. Select RiskScoringView and check Operational.
  16. Repeat steps 4-12.

Prepare the SPSS Modeler client

You need to ensure that the Modeler client can connect to the Collaboration and Deployment Services server and is running on the Modeler server. You can run the stream in the client if you have set up the Enterprise View plug-in and database ODBC DSN.

  1. Open the SPSS Modeler Client.
  2. Click Tools => Repository => Options.
  3. Specify the Collaboration and Deployment Services host name and port, and click OK.
  4. Specify the User ID and password.
  5. Select Local User Repository as the provider.
  6. Check remember the repository and user id, and click OK.
  7. Click Tools => Server Login.
  8. Click Add.
  9. Specify the Modeler server's host name and port, and click OK.
  10. Check Modeler Server to make it the default.
  11. Click set credentials.
  12. Enter the User ID and Password, and click OK.

Create the predictive model using SPSS Modeler

Now that you have the application views, you can create a model for the data. To create and deploy the model you need to:

  1. Create the model.
  2. Test the model.
  3. Create a scoring branch.
  4. Deploy the model to SPSS Collaboration and Deployment Services.

Create the model

In this section you will create a model from the training data using the CLAIMMADE flag as a target output from the remaining seven inputs. Creating the model in the SPSS Modeler client is a two-step process:

  1. Create the stream
  2. Execute the stream
  1. Open SPSS Modeler and create a new stream. Ensure that you are running against the Modeler server environment.
  2. Click the Sources tab and drag an Enterprise View node onto the canvas.
  3. As an example, let's create a CHAID model. To do this, click the Modeling tab and drag a CHAID node onto the canvas.
  4. Right-click the Enterprise View node and select Connect.
  5. Click on the CHAID node to connect them. The results should look like Figure 4.
    Figure 4. Figure 4. Modeler stream after step 4
    Modeler stream after step 4
  6. Double-click the Enterprise View node.
  7. Click Edit beside Connection.
  8. Click Add a new connection.
  9. Browse to the Application Views folder and select RiskScoringView.
  10. Ensure that the entries match Figure 5.
    Figure 5. Figure 5. Enterprise view analytic source
    Enterprise view analytic source
  11. Click OK.
  12. Next to Table Name, click Select.
  13. Select the TrainingData table, and click OK.
  14. Click the Types tab.
  15. Click the binocular icon to read values by default.
  16. Click Read Values.
  17. Set the CLAIMMADE field to Target, as shown in Figure 6, and click OK.
    Figure 6. Figure 6. Enterprise view types
    Enterprise view types
    You will notice the CHAID node name changes to CLAIMMADE.
  18. Click the Run button to execute the stream. You will notice that a new nugget-shaped node called CLAIMMADE displays. This is the model you have generated from the source data. Double-click on the nugget to view information about the model. If you are interested in how the model classifies a customer; click the Viewer tab. Here, as shown in Figure 7, you can see a tree diagram that shows how the model classifies a customer and how the input factors influence the likelihood of a claim.
    Figure 7. Figure 7. Rules for classifying a customer as high or low risk
    Rules for classifying a customer as high or low risk

    (See a larger version of Figure 7.)

One question you might ask is, "why would I not just build this decision tree in a business rules application instead of integrating a scoring service?" There are two key reasons to integrate the scoring service:

  • It allows you to retrain and redeploy the scoring model without having to reconfigure the rules. For example, you would want to schedule a job to retrain the model regularly to allow current information to affect the business decisions.
  • The single scoring model can be accessed by multiple users and applications throughout the enterprise.

Test the model

Drag and drop an Analysis node and a Table node onto the stream and connect the nugget node to them as shown in Figure 8. Now when you click the Run button, you will see;

  • An analysis output window where you can see how well our new model performs when classifying its training data.
  • A table output window that shows the results from scoring the input data
Figure 8. Figure 8. Test the model
Test the model

Create the scoring branch

Now that you have your model, you need to create a branch that will perform scoring. A branch is a single flow through the stream from an input to an output. You can see your scoring branch because it is automatically highlighted on the canvas. You'll use the data from the quote table as your operational scoring data. You will only score the quotes that are not purchased because the scenario accesses risk on policies that have not been purchased.

  1. From the pallet, drag another Enterprise View source node, a Select record ops node and an output Table node onto the canvas.
  2. Connect the nodes as shown in Figure 9:
    • Connect the enterprise view node connects to the select record ops node.
    • Connect the select record ops node connects to the nugget node.
    • Connect the nugget node connects to the output table node.
    Figure 9. Figure 9. Modeler Stream with nodes connected
    Modeler Stream with nodes connected
  3. Double-click the new Enterprise View node.
  4. By Connection, click the Edit button and configure the source node as follows:
    • Select the Connection RiskScoringView
    • Select the Application View RiskScoringView
    • Select the Version label LATEST
    • Select the Environment Operational
    • Select the Data provider OperationalDPD
    • Click OK.
    Figure 10. Figure 10. Enterprise view operational source
    Enterprise view operational sourc
  5. Click Select next to Table Name, and select the OperationalData table.
  6. Click the Types tab.
  7. Click the binocular icon to read values by default, and click Read Values, then click OK.
  8. Double-click the Select node.
  9. In the condition box, enter PURCHASED = 'N', and click OK.
  10. Right-click the Table node.
  11. Check Use as Scoring Branch.
  12. Run the model.

    The model should complete successfully and display a table output window that shows the results from scoring the quotes that were not purchased. If you look at the tables, you can see that the prediction fields are called $R-CLAIMMADE and $RC-CLAIMMADE. Next you'll perform some reclassification of the field names and data so that you can translate the prediction of whether a customer is likely to claim into high or low risk.

  13. Drag the field ops Filter and Reclassify nodes onto the canvas.
  14. Connect them into the stream as shown in Figure 11:
    • Connect the nugget node to the filter node.
    • Connect the filter node to the reclassify node.
    • Connect the reclassify node to the table output node.
    Figure 11. Figure 11. Modeler stream after field ops nodes are connected
    Modeler stream after field ops nodes are connected
  15. Double-click the Filter node and change the field names of $R-CLAIMMADE and $RC-CLAIMMADE to RISK and RISKCONFIDENCE, as shown in Figure 12.
    Figure 12. Figure 12. Rename the fields in the Filter node
    Rename the fields in the filter node
  16. Double-click the Reclassify node and click on the Settings tab. Set the following properties as shown in Figure 13:
    • Set the Reclassify field to RISK.
    • Click the Get button to populate the Original Value column.
    • Where the Original value is N set the New value to Low.
    • Where the Original value is Y set the New value to High.
    • Click OK.
    Figure 13. Figure 13. Reclassify the prediction values
    Reclassify the prediction values

When you run the stream, the table output display should now be reclassified as shown in Figure 14.

Figure 14. Figure 14. Reclassified table output
Reclassified table output

Deploy the model to SPSS Collaboration and Deployment Services

Now you need to deploy the scoring model to an SPSS Collaboration and Deployment Services repository.

  1. First, ensure that the repository's settings are correct, then go to Tools => Stream Properties => Deployment and set the following properties as shown in Figure 15:
    • Set the Deployment type to Model Refresh.
    • Set the Scoring node to Table.
    • Set the Modeling node to CLAIMMADE.
    • Set the Model nugget to CLAIMMADE.
    • Ensure that Deploy as scenario is checked.
    Figure 15. Figure 15. Deployment settings
    Deployment settings
  2. Click Check to ensure that there are no errors. If no errors are found, click Store. To finish the deployment, select the Scenario folder location, name the file ScoringScenario.scn, and click Store.
  3. Click OK to exit the Deployment window.

Configure the scoring service in SPSS Collaboration and Deployment Services

Before a model can be used for real-time scoring, you must define some supplemental information. The scoring configuration allows you to define the parameters, outputs, identification, logging and cache you want the scoring to use. This allows for a single model to be used in a variety of scoring situations.

Create a scoring configuration for the model

To create a scoring configuration, do the following:

  1. Open IBM SPSS Collaboration and Deployment Services Deployment Manager and log in to the Collaboration and Deployment Services server.
  2. You should be able to see the scenario you just deployed. Right-click it and select Configure Scoring.
  3. Enter the name RiskScoringConfig.
  4. Click Next three times.
  5. Check the box to not return model inputs, then click Next.
  6. For model outputs, check RISK and RISKCONFIDENCE.
  7. Click Next twice, then click Finish.

Test the scoring configuration using the deployment portal

Now that you have defined the scoring configuration, you can test that you can use the model for real-time scoring using the deployment portal.

  1. Open the deployment portal at http://<host>:<port>/peb and log in.
  2. Click the Content Repository tab.
  3. Click the Scenarios folder.
  4. Click ScoringScenario.scn.

    You are now able to see the inputs required for the scoring. Enter your scoring details as in Figure 16.

    Note: The select statement in the branch only allows you to score policies that have not been purchased. Therefore, to get a score result you should set the PURCHASED field to 'N'.

    Figure 16. Figure 16. Test scoring input
    Test scoring input
  5. Click Score.
  6. You should see results like Figure 17.
    Figure 17. Figure 17. Test scoring result
    Test scoring result

Refresh the model

A job is used to provide information on how to execute one or more scenarios or streams. Scenarios can have three types of jobs. In this scenario we are interested in the refresh job.

Create the job

To create the job, complete the following steps:

  1. Right-click the Jobs folder, and select New => Job.
  2. Enter the name RiskScoringRefreshJob, and click Finish.
  3. On the right of the Content Explorer, right-click ScoringScenario.scn, and select Add to Job.
  4. A ScoringScenario.scn_step node appears in the job.
  5. Click on the ScoringScenario.scn_step node.
  6. On the General tab, specify the following settings as shown in Figure 18.
    • Set the Object Version to LATEST.
    • Set the Modeler Server to the Modeler server definition you created earlier.
    • Set the Modeler Login to the credential definition for the Modeler server that you created earlier.
    • Set the Content Repository Server to the Content Repository Server definition you created earlier.
    • Set the Content Repository Login to the credential definition for the Content Repository server that you created earlier.
    • Select the Type Refresh and ensure that the checked refresh relationship CLAIMMADE-CLAIMMADE (Default) appears.
    Figure 18. Figure 18. Configure scenario properties
    Configure scenario properties

    (See a larger version of Figure 18.)

  7. On the Enterprise View tab, set the EV Node to AnalyticDPD, as shown in Figure 19.
    Figure 19. Figure 19. Set EV Node to AnalysticDPD
    Set EV Node to AnalysticDPD

    (See a larger version of Figure 19.)

  8. On the Results tab, Set the Output Target to the current scoring scenario file, as shown in Figure 20. This will ensure that the job replaces the current scenario with a refreshed model.
    Figure 20. Figure 20. Ensure that current scenario file will be overwritten
    Ensure that current scenario file will be overwritten

    (See a larger version of Figure 20.)

  9. Save the job.

Test the job

To test the job, do the following:

  1. In the Content Explorer, right-click RiskScoringRefreshJob and click Run Job.
  2. With the job open in the editor, select View => Show View => Job History.
  3. Select your Collaboration and Deployment Services server and refresh the view.
  4. You can now see that your job status is Running. Wait a few minutes and refresh the screen until the job completes with the status of Success, as shown in Figure 21.
    Figure 21. Figure 21. Refresh job completed successfully
    Refresh job completed successfully
  5. Right-click ScoringScenario.scn in the Content Explorer, and select Properties.
  6. Check the last modified data on the General tab and the versions available on the Versions tab to verify that a new version has been created by the job, as shown in Figure 22.
    Figure 22. Figure 22. Verify model refresh
    Verify model refresh

Schedule the job

The final step is to configure the scenario job to automatically refresh the model. There are two types of scheduling you can use to trigger the refresh job:

  • A time-based schedule (such as, run once an hour)
  • A message-based schedule (such as, listen to a JMS topic for a start job message)

This article focuses on time-based scheduling. Refer to the IBM SPSS Collaboration and Deployment Services Deployment Manager 4.2 User's Guide (see Resources) for information on message-based scheduling.

  1. Right-click RiskScoringRefreshJob in the Content Explorer, and select New Schedule => Time Based.
  2. For the Credentials field browse to and select Collaboration and Deployment Services, then click Next.
  3. Set the time-based schedule to run once an hour, as shown in Figure 23.
    Figure 23. Figure 23. Time-based schedule to run hourly
    Time-based schedule to run hourly
  4. Click Next again, then click Finish.

You can monitor your schedule by right-clicking the job in the Content Explorer and clicking Show Schedule.


Final words

You have now configured a scoring service and a scheduled model refresh job in your enterprise environment for use by your enterprise applications. Now that you have a basic understanding of how to set up the scoring service and model refresh job, what's next?

  • In this article, you accepted the default version label LATEST . This is not the best practice; instead, it's recommended that you use specific version labeling. Version labels are used to define the specific development and production version of an artifact to use. Find out more about labeling in the IBM SPSS Collaboration and Deployment Services Deployment Manager 4.2 User's Guide provided with the product.
  • Use a real-time data provider in a scoring configuration to pick up some scoring parameters to be pulled out of the database. For example, a customer ID input could be used to automatically collect information about a customer. You need to define a table key in the enterprise view to use real-time data providers.
  • If you have not already added a security provider, you can implement a security provider in Collaboration and Deployment Services. Refer to the IBM SPSS Collaboration and Deployment Services Deployment Manager 4.2 Installation and Configuration Guide, provided with the product, for detailed configuration information.
  • You can implement refresh and scoring notifications so that you can track model refreshing and scoring using messaging forms like email or JMS. For more information, refer to the IBM SPSS Collaboration and Deployment Services Deployment Manager 4.2 User's Guide, provided with the product.
  • You can implement the scoring service as a web service client using web service generation tools, as described in the Scoring Service 4.2 Developer's Guide, provided with the product. You can find the WSDL for the scoring service at http://<host>:<port>/scoring/services/Scoring?WSDL. You can use the WSDL to generate a web service client to call the scoring service. The WSDL has cyclic data types, which may give you trouble in generating a client. If so, your IBM SPSS representative can provide you with the individual data definition files.

Download

DescriptionNameSize
Files for importing to Process CenterDB2_HMINSUR_Dist.zip46KB

Resources

IBM SPSS provides documentation that explain the concepts discussed in this article in more detail. These guides are provided with the products, or can be downloaded here:

  • The "Scoring Service 4.2 Developer's Guide" provides information on the how to implement the scoring service.
  • The "IBM SPSS Collaboration and Deployment Services Deployment Manager 4.2 User's Guide" provides information on the deployment manager features.
  • The IBM "SPSS Collaboration and Deployment Services Deployment Manager 4.2 Installation and Configuration Guide (UNIX)" provides information on the Collaboration and Deployment Services server configuration.
  • The "IBM SPSS Collaboration and Deployment Services Enterprise View Driver 4.2 User's Guide" provides information on how to install and use the enterprise view source node in an SPSS Modeler stream.
  • The "IBM SPSS Modeler 14.1 Deployment Guide" provides information on stream and scenario deployment.
  • The "IBM SPSS Modeler 14.1 User's Guide" provides more information on how to create and use streams. It also provides some very useful tutorials to help you get started.
  • The "IBM SPSS Modeler 14.1 Modeling Nodes" helps you understand the different types of modeling nodes.
  • developerWorks BPM zone: Get the latest technical resources on IBM BPM solutions, including downloads, demos, articles, tutorials, events, webcasts, and more.
  • IBM BPM Journal: Get the latest articles and columns on BPM solutions in this quarterly journal, also available in both Kindle and PDF versions.

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Business process management on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Business process management, Big data and analytics
ArticleID=760713
ArticleTitle=Integrating SPSS predictive analytics into Business Intelligent applications, Part 1: Integrating SPSS Modeler and Collaboration and Deployment Services
publish-date=09292011