# Quick start: Build a model using SPSS Modeler #

You can create, train, and deploy models using SPSS Modeler\. Read about SPSS Modeler, then watch a video and follow a tutorial that’s suitable for beginners and requires no coding\.

Your basic workflow includes these tasks:

<!-- <ol> -->

1.  Open your sandbox project\. Projects are where you can collaborate with others to work with data\.
2.  Add an SPSS Modeler flow to the project\.
3.  Configure the nodes on the canvas, and run the flow\.
4.  Review the model details and save the model\.
5.  Deploy and test your model\.

<!-- </ol> -->

## Read about SPSS Modeler ##

With SPSS Modeler flows, you can quickly develop predictive models using business expertise and deploy them into business operations to improve decision making\. Designed around the long\-established SPSS Modeler client software and the industry\-standard CRISP\-DM model it uses, the flows interface supports the entire data mining process, from data to better business results\.

SPSS Modeler offers a variety of modeling methods taken from machine learning, artificial intelligence, and statistics\. The methods available on the node palette allow you to derive new information from your data and to develop predictive models\. Each method has certain strengths and is best suited for particular types of problems\.

[Read more about SPSS Modeler](https://dataplatform.cloud.ibm.com/docs/content/wsd/spss-modeler.html)

[Learn about other ways to build models](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/data-science.html)

## Watch a video about creating a model using SPSS Modeler ##

![Watch Video](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/lc-video.png) Watch this video to see how to create and run an SPSS Modeler flow to train a machine learning model\.

This video provides a visual method to learn the concepts and tasks in this documentation\.

## Try a tutorial to create a model using SPSS Modeler ##

In this tutorial, you will complete these tasks:

<!-- <ul> -->

 *  [Task 1: Open a project\.](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-spss.html?context=cdpaas&locale=en#step01)
 *  [Task 2: Add a data set to your project\.](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-spss.html?context=cdpaas&locale=en#step02)
 *  [Task 3: Create the SPSS Modeler flow\.](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-spss.html?context=cdpaas&locale=en#step03)
 *  [Task 4: Add the nodes to the SPSS Modeler flow\.](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-spss.html?context=cdpaas&locale=en#step04)
 *  [Task 5: Run the SPSS Modeler flow and explore the model details\.](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-spss.html?context=cdpaas&locale=en#step05)
 *  [Task 6: Evaluate the model\.](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-spss.html?context=cdpaas&locale=en#step06)
 *  [Task 7: Deploy and test the model with new data\.](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-spss.html?context=cdpaas&locale=en#step07)

<!-- </ul> -->

This tutorial will take approximately 30 minutes to complete\.

### Example data ###

The data set used in this tutorial is from the University of California, Irvine, and is the result of an extensive study based on hospital admissions over a period of time\. The model will use three important factors to help predict chronic kidney disease\.

Expand all sections

<!-- <ul> -->

 *  Tips for completing this tutorial
    
    \#\#\# Use the video picture-in-picture Tip: Start the video, then as you scroll through the tutorial, the video moves to picture-in-picture mode. Close the video table of contents for the best experience with picture-in-picture. You can use picture-in-picture mode so you can follow the video as you complete the tasks in this tutorial. Click the timestamps for each task to follow along.The following animated image shows how to use the video picture-in-picture and table of contents features: ![How to use picture-in-picture and chapters](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/pip-and-chapters.gif)\{: width="560px" height="315px" data-tearsheet="this"\} \#\#\# Get help in the community If you need help with this tutorial, you can ask a question or find an answer in the [Cloud Pak for Data Community discussion forum](https://community.ibm.com/community/user/cloudpakfordata/communities/community-home/digestviewer?communitykey=c0c16ff2-10ef-4b50-ae4c-57d769937235)\{: new\_window\}. \#\#\# Set up your browser windows For the optimal experience completing this tutorial, open Cloud Pak for Data in one browser window, and keep this tutorial page open in another browser window to switch easily between the two applications. Consider arranging the two browser windows side-by-side to make it easier to follow along. ![Side-by-side tutorial and UI](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/tutorial-side-by-side.png)\{: width="560px" height="315px" data-tearsheet="this"\} Tip: If you encounter a guided tour while completing this tutorial in the user interface, click **Maybe later**.  
    [Back to the top](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-spss.html?context=cdpaas&locale=en#video-preview)  
    
<!-- </ul> -->

<!-- <ul> -->

 *  Task 1: Open a project
    
    You need a project to store the SPSS Modeler flow. You can use your sandbox project or create a project. 1. From the navigation menu ![Navigation menu](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/navigation-menu.svg)\{: iih\}, choose **Projects > View all projects** 1. Open your sandbox project. If you want to use a new project: 1. Click **New project**. 1. Select **Create an empty project**. 1. Enter a name and optional description for the project. 1. Choose an existing [object storage service instance](https://dataplatform.cloud.ibm.com/docs/content/wsj/admin/storage-options.html)\{: new\_window\} or create a new one. 1. Click **Create**. For more information or to watch a video, see [Creating a project](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/projects.html)\{: new\_window\}. \#\#\# ![Checkpoint icon](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/checkmark--filled-blue.svg)\{: iih\} Check your progress The following image shows the new project.  
      
    ![The following image shows the new project.](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/spss-new-project.png)\{: width="100%" \}  
    [Back to the top](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-spss.html?context=cdpaas&locale=en#video-preview)  
    
<!-- </ul> -->

<!-- <ul> -->

 *  Task 2: Add the data set to your project
    
    ![preview tutorial video](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/lc-video.png) To preview this task, watch the video beginning at 00:13. This tutorial uses a sample data set. Follow these steps to add the sample data set to your project: 1. Access the [UCI ML Repository: Chronic Kidney Disease Data Set](https://dataplatform.cloud.ibm.com/exchange/public/entry/view/a25870b7249ad55605de7a2e59567a7e)\{: new\_window\} in the *Samples*. 1. Click **Preview**. There are three important factors that help predict chronic kidney disease which are available as part of this analysis: the age of the test subject, the serum creatinine test results, and diabetes test results. And the class value indicates if the patient has been previously diagnosed for kidney disease. 1. Click **Add to project**. 1. Select the project from the list, and click **Add**. 1. Click **View Project**. 1. From your project's *Assets* page, locate the **UCI ML Repository Chronic Kidney Disease Data Set.csv** file. \#\#\# ![Checkpoint icon](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/checkmark--filled-blue.svg)\{: iih\} Check your progress The following image shows the *Assets* tab in the project.  
      
    ![The following image shows the \*Assets\* tab in the project.](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/spss-project-asset.png)\{: width="100%" \}  
    [Back to the top](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-spss.html?context=cdpaas&locale=en#video-preview)  
    
<!-- </ul> -->

<!-- <ul> -->

 *  Task 3: Create the SPSS Modeler flow
    
    ![preview tutorial video](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/lc-video.png) To preview this task, watch the video beginning at 01:11. Follow these steps to create an SPSS Modeler flow in the project: 1. Click **New asset > Build models as a visual flow**. 1. Type a name and description for the flow. 1. For the runtime definition, accept the **Default SPSS Modeler S** definition. 1. Click **Create**. This opens up the Flow Editor that you'll use to create the flow. \#\#\# ![Checkpoint icon](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/checkmark--filled-blue.svg)\{: iih\} Check your progress The following image shows the flow editor.  
      
    ![The following image shows the flow editor.](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/spss-flow-editor.png)\{: width="100%" \}  
    [Back to the top](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-spss.html?context=cdpaas&locale=en#video-preview)  
    
<!-- </ul> -->

<!-- <ul> -->

 *  Task 4: Add the nodes to the SPSS Modeler flow
    
    ![preview tutorial video](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/lc-video.png) To preview this task, watch the video beginning at 01:31. After you load the data, you must transform the data. Create a simple flow by dragging transformers and estimators onto the canvas and connecting them to the data source. Use the following nodes from the palette: - Data Asset: loads the csv file from the project - Partition: divides the data into training and testing segments - Type: sets the data type. Use it to designate the `class` field as a `target` type. - C5.0: a classification algorithm - Analysis: view the model and check its accuracy - Table: preview the data with predictions Follow these steps to create the flow: 1. Add the data asset node: 1. From the *Import* section, drag the **Data Asset** node onto the canvas. 1. Double-click the **Data Asset** node to select the data set. 1. Select **Data asset > UCI ML Repository Chronic Kidney Disease Data Set.csv**. 1. Click **Select**. 1. View the Data Asset properties. 1. Click **Save**. 1. Add the Partition node: 1. From the *Field Operations* section, drag the **Partition** node onto the canvas. 1. Connect the **Data Asset** node to the **Partition** node. 1. Double-click the **Partition** node to view its properties. The default partition divides half of the data for training and the other half for testing. 1. Click **Save**. 1. Add the Type node: 1. From the *Field Operations* section, drag the **Type** node onto the canvas. 1. Connect the **Partition** node to the **Type** node. 1. Double-click the **Type** node to view its properties. The Type node specifies the measurement level for each field. This source data file uses four different measurement levels: Continuous, Categorical, Nominal, Ordinal, and Flag. 1. Search for the `class` field. For each field, the role indicates the part that each field plays in modeling. Change the `class`**Role** to **Target** - the field you want to predict. 1. Click **Save**. 1. Add the C5.0 classification algorithm node: 1. From the *Modeling* section, drag the **C5.0** node onto the canvas. 1. Connect the **Type** node to the **C5.0** node. 1. Double-click the **C5.0** node to view its properties. By default, the C5.0 algorithm builds a decision tree. A C5.0 model works by splitting the sample based on the field that provides the maximum information gain. Each sub-sample defined by the first split is then split again, usually based on a different field, and the process repeats until the subsamples can't be split any further. Finally, the lowest-level splits are reexamined, and those that don't contribute significantly to the value of the model are removed. 1. Toggle on **Use settings defined in this node**. 1. For *Target*, select **class**. 1. In the **Inputs** section, click **Add columns**. 1. Clear the checkbox next to *Field name*. 1. Select **age**, **sc**, **dm**. 1. Click **OK**. 1. Click **Save**. \#\#\# ![Checkpoint icon](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/checkmark--filled-blue.svg)\{: iih\} Check your progress The following image shows the completed flow.  
      
    ![flow showing Data Asset node, Partition node, Type node, and C5.0 class node](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/spss-completed-flow.png)\{: width="100%" \}  
    [Back to the top](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-spss.html?context=cdpaas&locale=en#video-preview)  
    
<!-- </ul> -->

<!-- <ul> -->

 *  Task 5: Run the SPSS Modeler flow and explore the model details
    
    ![preview tutorial video](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/lc-video.png) To preview this task, watch the video beginning at 04:20. Now that you have designed the flow, follow these steps to run the flow, and examine the tree diagram to see the decision points: 1. Right-click the **C5.0** node and select **Run**. Running the flow generates a new model nugget on the canvas. 1. Right-click the model nugget and select **View Model** to view the model details. 1. View the **Model Information** which provides a model summary. 1. Click **Top Decision Rules**. A table displays a series of rules that were used to assign individual records to child nodes based on the values of different input fields. 1. Click **Feature Importance**. A chart shows the relative importance of each predictor in estimating the model. From this, you can see that serum creatinine is easily the most significant factor, with diabetes being the next most significant factor. 1. Click **Tree Diagram**. The same model is displayed in the form of a tree, with a node at each decision point. 1. Hover over the top node, which provides a summary for all the records in the data set. Almost 40% of the cases in the data set are classified as not diagnosed with kidney disease. The tree can provide additional clues as to what factors might be responsible. 1. Notice the two branches stemming from the top node, which indicates a split by *serum creatinine*. - Review the branch that shows records where the serum creatinine is greater than 1.25. In this case, 100% of those patients have a positive kidney disease diagnosis. - Review the branch that shows records where the serum creatinine is less than or equal to 1.25. Almost 80% of those patients don't have a positive kidney disease diagnosis, but almost 20% with lower serum creatinine were still diagnosed with kidney disease. 1. Notice the branches stemming from *sc<=1.250*, which is split by *diabetes*. - Review the branch that shows patients with low serum creatinine (sc<=1.250) and diagnosed diabetes (dm=yes). 100% of these patients were also diagnosed with kidney disease. - Review the branch that shows patients with low serum creatinine (sc<=1.250) and no diabetes (dm=no), 85% were not diagnosed with kidney disease, but 15% of them were still diagnosed with kidney disease. 1. Notice the branches stemming from *dm = no*, which is split by the last significant factor, *age*. - Review the branch that shows patients 14 years old or younger (age <= 14). This branch shows that 75% of young patients with low serum creatinine and no diabetes were at risk of getting kidney disease. - Review the branch that shows patients older than 14 years old (age > 14). This branch shows that only 12% of patients over 14 years old with low serum creatinine and no diabetes were at risk of getting kidney disease. 1. Close the model details. \#\#\# ![Checkpoint icon](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/checkmark--filled-blue.svg)\{: iih\} Check your progress The following image shows the tree diagram.  
      
    ![The following image shows the tree diagram.](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/spss-tree-diagram.png)\{: width="100%" \}  
    [Back to the top](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-spss.html?context=cdpaas&locale=en#video-preview)  
    
<!-- </ul> -->

<!-- <ul> -->

 *  Task 6: Evaluate the model
    
    ![preview tutorial video](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/lc-video.png) To preview this task, watch the video beginning at 07:24. Follow these steps to use the Analysis and Table nodes to evaluate the model: 1. From the *Outputs* section, drag the **Analysis** node onto the canvas. 1. Connect the **Model** nugget to the **Analysis** node. 1. Right-click the **Analysis** node, and select **Run**. 1. From the *Outputs* panel, open the **Analysis**, which shows that the model correctly predicted a kidney disease diagnosis almost 95% of the time. Close the **Analysis**. 1. Right-click the **Analysis** node, and select **Save branch as a model**. 1. For the *Model name*, type `Kidney Disease Analysis`\{: .cp\}. 1. Click **Save**. 1. Click **Close**. 1. From the *Outputs* section, drag the **Table** node onto the canvas. 1. Connect the **Model** nugget to the **Table** node. 1. Right-click the **Table** node, and select **Preview data**. 1. When the Preview displays, scroll to the last two columns. The **$C-Class** column contains the prediction of kidney disease, and the **$CC-Class** column indicates the confidence score for that prediction. 1. Close the **Preview**. \#\#\# ![Checkpoint icon](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/checkmark--filled-blue.svg)\{: iih\} Check your progress The following image shows the preview table with the predictions.  
      
    ![The following image shows the preview table with the predictions.](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/spss-preview-predictions.png)\{: width="100%" \}  
    [Back to the top](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-spss.html?context=cdpaas&locale=en#video-preview)  
    
<!-- </ul> -->

<!-- <ul> -->

 *  Task 7: Deploy and test the model with new data
    
    ![preview tutorial video](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/lc-video.png) To preview this task, watch the video beginning at 09:10. Lastly, follow these steps to deploy this model and predict the outcome with new data. 1. Return to the Project's **Assets** tab. 1. Click the **Models** section, and open the **Kidney Disease Analysis** model. 1. Click **Promote to deployment space**. 1. Choose an existing deployment space. If you don't have a deployment space, you can create a new one: 1. Provide a space name. 1. Select a storage service. 1. Select a machine learning service. 1. Click **Create**. 1. Click **Close**. 1. Select **Go to the model in the space after promoting it**. 1. Click **Promote**. 1. When the model displays inside the deployment space, click **New deployment**. 1. Select **Online** as the *Deployment type*. 1. Specify a name for the deployment. 1. Click **Create**. 1. When the deployment is complete, click the deployment name to view the deployment details page. 1. Go to the **Test** tab. You can test the deployed model from the deployment details page in two ways: test with a form or test with JSON code. 1. Click the **JSON input**, then copy the following test data and paste it to replace the existing JSON text: `json { "input_data": [ { "fields":  "age", "bp", "sg", "al", "su", "rbc", "pc", "pcc", "ba", "bgr", "bu", "sc", "sod", "pot", "hemo", "pcv", "wbcc", "rbcc", "htn", "dm", "cad", "appet", "pe", "ane", "class" ], "values":   "62", "80", "1.01", "2", "3", "normal", "normal", "notpresent", "notpresent", "423", "53", "1.8", "", "", "9.6", "31", "7500", "", "no", "yes", "no", "poor", "no", "yes", "ckd" ] ] } ] }` 1. Click **Predict** to predict whether a 62 year old with diabetes and a serum creatinine ratio of 1.8 would likely be diagnosed with kidney disease. The resulting prediction indicates that this patient has a high probability of a kidney disease diagnosis. \#\#\# ![Checkpoint icon](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/checkmark--filled-blue.svg)\{: iih\} Check your progress The following image shows the Test tab for the model deployment with a prediction.  
      
    ![The following image shows the Test tab for the model deployment with a prediction.](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/spss-deployment-prediction.gif)\{: width="100%" \}  
    [Back to the top](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-spss.html?context=cdpaas&locale=en#video-preview)  
    
<!-- </ul> -->

## Next steps ##

Now you can use this data set for further analysis\. For example, you can perform tasks such as:

<!-- <ul> -->

 *  [Cleansing and shaping data](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-refine.html)
 *  [Analyze the data in a Jupyter notebook](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-analyze.html)

<!-- </ul> -->

## Additional resources ##

<!-- <ul> -->

 *  Find more [SPSS Modeler tutorials](https://dataplatform.cloud.ibm.com/docs/content/wsd/tutorials.html)
 *  Try these other methods to build models:
    
    <!-- <ul> -->
    
     *  [Build and deploy a machine learning model with AutoAI](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build.html)
     *  [Build and deploy a machine learning model with SPSS Modeler](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-build-spss.html)
     *  [Build and deploy a Decision Optimization model](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/get-started-do.html)
    
    <!-- </ul> -->
    
 *  View more [videos](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/videos-wx.html)\.
 *  Find sample data sets, projects, models, prompts, and notebooks in the Samples to gain hands\-on experience:
    
    ![Notebook icon](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/notebook.svg)[Notebooks](https://dataplatform.cloud.ibm.com/gallery?context=wx&format=notebook) that you can add to your project to get started analyzing data and building models.
    
    ![Project icon](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/ibm-cloud--projects.svg)[Projects](https://dataplatform.cloud.ibm.com/gallery?context=wx&format=project-template) that you can import containing notebooks, data sets, prompts, and other assets.
    
    ![Data set icon](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/data--set.svg)[Data sets](https://dataplatform.cloud.ibm.com/gallery?context=wx&format=dataset) that you can add to your project to refine, analyze, and build models.
    
    ![Prompt icon](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/prompt.svg)[Prompts](https://dataplatform.cloud.ibm.com/gallery?context=wx&format=example-prompt) that you can use in the Prompt Lab to prompt a foundation model.
    
    ![Model icon](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/images/model.svg)[Foundation models](https://dataplatform.cloud.ibm.com/gallery?context=wx&format=foundation-model) that you can use in the Prompt Lab.
 *  Contribute to the [SPSS Modeler community](https://ibm.biz/spss-modeler-community)

<!-- </ul> -->

**Parent topic:**[Quick start tutorials](https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/quickstart-tutorials.html)

<!-- </article "role="article" "> -->