This video shows how to create, train, save, and deploy a logistic regression binary classification 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 the AutoAI tutorial.

23 comments on"Build a Binary Classification 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}

        • I was getting the same issue, and when I changed it I got the following error:

          File “”, line 2
          scoring_header = {‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer ‘+mltoken}
          SyntaxError: invalid syntax

    • 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?

  4. luca marzotti April 19, 2019

    I cannot find the notebook anymore

  5. Kostyantyn Kravchenko May 14, 2019

    Hello, thank you for the tutorial.
    Are you planning to update the Python-Flask part?
    It becomes totally irrelevant with the new interface and new app deployment process. Thank you!

    • It’s in plan to update this video, but there’s no definitive timeline yet

  6. Is Python Flask is depreciated.
    In IBM cloud -> Catalog has 1. Python Microservice with Flask and 2. Python Web App with Flask which one need to be used to launch the app.

    • This notebook/tutorial/video hasn’t been updated yet, but I suspect the Python Web App with Flask would be the one to use

  7. The link at the top of the page for – “After watching the video, try one of the model builder tutorials.” has a broken link.

    This link does not work :-

  8. Andrew Pfeiffer January 03, 2020

    Can someone please help me find the GoSales dataset? I am unable to find it, in Watson Studio I don’t see the screen where the narrator said they searched the IBM Watson community to get the GoSales dataset. Thank you.

  9. Andrei Gavrila January 09, 2020

    When doing the first tutorial on the Go Sales CSV i get an error “Pipeline progress is unavailable due to an error”. By changing the algorithm from binary classification to any other it works but with a very low result

    • I’ve reported this issue, and I’m waiting to get feedback.

      • @Andrei – this issue is being resolved, but in the meantime, there is a quick fix. If you edit the csv file and replace TRUE/FALSE with T/F and then upload the revised data set to the project, you’ll be able to successfully run the experiment with binary classification, and get high results.

Join The Discussion

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