SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Use Your Own Data to Train a Machine Learning Model and Get Recommendations Based on Users' Browsing History

Use the Personalized Recommendation service to train your own machine learning model to give visitors to your website highly personalized recommendations based on their browsing history.

Overview

🎓 beginner 30 min. Machine LearningBeginnerArtificial IntelligenceCloudSAP Business Technology PlatformSAP Ai ServicesPersonalized RecommendationFree Tier

You will learn

  • How to call and test the Personalized Recommendation service
  • How to access and use Swagger UI (User Interface)
  • How to submit a training job and trigger model serving
  • How to get recommendations based on users’ browsing history
Juliana Morais J Juliana Morais December 11, 2023
Created by June 2, 2022
Contributors

Prerequisites

Steps

Intro

In this tutorial, you will use your own dataset to train a machine learning model to get next-item recommendations.


Step 1 Authorize Swagger UI

You will use Swagger UI, via any web browser, to call the Personalized Recommendation service APIs. Swagger UI allows developers to effortlessly interact and try out every single operation an API exposes for easy consumption. For more information, see Swagger UI.

In the service key you created for Personalized Recommendation in the previous tutorial: Use the Free Tier Service Plan to Set Up Account for Personalized Recommendation and Get Service Key, you should find (outside the uaa section of the service key) an entry called url (as highlighted in the image below).

  1. To access the Personalized Recommendation Swagger UI, add /doc to the url value, paste it into any web browser and press Enter.

    PRS
    PRS

  2. To be able to use the Swagger UI endpoints, you need to authorize yourself. In the top right corner, click Authorize.

    PRS
    PRS

  3. Get the access_token value created in the previous tutorial: Get OAuth Access Token for Personalized Recommendation via Web Browser, then add Bearer in front of it, and enter in the Value field.

    Code
    bearer <access_token>

    PRS
    PRS

  4. Click Authorize and then click Close.

    PRS
    PRS

Step 2 Prepare dataset
+
Step 3 Train your own machine learning model
+
Step 4 Get training job status
+
Step 5 Make inference call
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 5
1. Authorize Swagger UI 2. Prepare dataset 3. Train your own machine learning model 4. Get training job status 5. Make inference call

Learn more →