This video shows you how to build a logistic regression model that assesses which category of goods a customer might be interested in.

This video shows you how to build a logistic regression model that assesses that a customer of an outdoor equipment company will buy a tent. For this video, the Watson Machine Learning, Apache Spark, and object storage instances are already provisioned in IBM Bluemix, and there’s a project in Data Science Experience with all of the associated services. If you haven’t done so yet, watch the two “Getting Started” videos in the IBM Watson Machine Learning Learning Center:

From the overview tab you can explore the community. For this video, you’ll use a dataset called “Go Sales Transactions for Logistics Regression Model.”


You see a data preview and the column definitions. Download the dataset as a CSV file, and then bookmark this dataset in the Watson Machine Learning project, so you can easily find it again later. Now view the project. In the File slide-out panel, browse for the CSV file and open it. Once it’s finished loading, you’ll see it in the list of data assets.

Now you’re ready to create a new model. Name this model “Logistics Regression” and provide a description. The Machine Learning and Spark services are already associated. Select Manual for the training method and create the model.

After you load the data, you must train the data. This consists of choosing an appropriate technique and estimator to apply to the raw data. For this dataset, you’ll use the “Is_Tent” label column and the Logistic Regression estimator type.

After you’re trained and saved the model, you’re ready to deploy it. Click Deploy.

When the model deployment is complete, view the deployment. Take note of the Scoring End Point for future reference and remember that you can have only one deployment per user. Finally, test the model prediction by using the sample input data and click Predict. This example predicts that there’s less than a 17 percent chance that a 27-year old single professional male will buy a tent. Change the input data to test different predictions.


Resources for you

Cognitive Computing
Create apps that accelerate, enhance, and scale the human experience.

Join The Discussion

Your email address will not be published. Required fields are marked *