This video shows how to create, train, save, and deploy a logistic regression model that assesses the likelihood that a customer of an outdoor equipment company will buy a tent based on age, sex, marital status and job profession. After watching the video, try one of the model builder tutorials.

This videos shows you how to create a very simple Python Flask web application front end to call a deployed Logistic Regression model in real time. This video is a continuation of the logistic regression analysis video.

7 comments on"Build a Logistic Regression Model With Watson Machine Learning"

  1. Viral Ruparel May 31, 2018

    not getting api results in notes after giving the credentials.

  2. VidhyaSivakumar December 31, 2018

    # Call scoring endpoint with data payload

    scoring_header = {‘Content-Type’: ‘application/json’, ‘Authorization’: mltoken}

    payload = {“fields”: [“GENDER”,”AGE”,”MARITAL_STATUS”,”PROFESSION”],”values”: [[“M”, 20, “Single”, “Student”]]}

    scoring =, json=payload, headers=scoring_header)


    {“trace”:”5e943881d813208ed0d2251a31c73644″,”errors”:[{“code”:”token_format_is_unsupported”,”message”:”Provided token should be in bearer token format”,”target”:{“type”:”header”,”name”:”Authorization”}}]}

    • Brian Murphy March 04, 2019

      Did this ever get resolved ? Getting same issue

      • Change the scoring_header to
        scoring_header = {‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer’ + mltoken}

    • Yury Jefse March 28, 2019

      You should input the word “Bearer” before the token

      scoring_header = {‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer ‘+mltoken}

  3. Hi,

    I am working on Watson Machine Learning models and when I am trying to add data sets to my project, I am not able to add. Can you please help on this?

Join The Discussion

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