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 a Regression Dataset Schema to Upload Training Data to Data Attribute Recommendation

Upload a dataset to your Data Attribute Recommendation service instance to afterwards be able to train your machine learning model using the regression model template.

Overview

🎓 beginner 15 min. Machine LearningBeginnerArtificial IntelligenceCloudSAP Business Technology PlatformSAP Ai ServicesData Attribute RecommendationFree Tier

You will learn

  • How to authorize your client to communicate with your Data Attribute Recommendation service instance
  • How to do upload data to your Data Attribute Recommendation service instance to train a machine learning model
Juliana Morais J Juliana Morais December 11, 2023
Created by May 16, 2022
Contributors

Prerequisites

Steps

Intro

To try out Data Attribute Recommendation, the first step is to upload data that will be used to train a machine learning model. For more information, see Data Attribute Recommendation help portal documentation. For further definition of specific terms, see Concepts.

Business Use Case: Use the regression model template to predict the price of new products based on a training dataset that has the following product information: manufacturer, description and price.

The regression model template is a generic neural network for regression which seeks to minimize the mean squared error (MSE). This model template does not support multi-label dataset schemas. Use single-label dataset schemas only.

To better understand the regression model template from the Data Attribute Recommendation service, take a look at the following blog post: Solving regression use-cases with Data Attribute Recommendation. See also Free Tier Option Technical Constraints.

To create a machine learning model that predicts the price of new products you will first prepare the dataset schema and upload the training data to the service. In this tutorial, you will focus on the data preparation, uploading and defining the dataset schema. For that, you will use a public product dataset from Best Buy.


Step 1 Authorize Swagger UI

You will use Swagger UI, via any web browser, to call the Data Attribute Recommendation 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 Data Attribute Recommendation in the previous tutorial: Use Free Tier to Set Up Account for Data Attribute Recommendation and Get Service Key or Use Trial to Set Up Account for Data Attribute Recommendation and Get Service Key, you find a section called swagger (as highlighted in the image below) with three entries, called dm (data manager), mm (model manager) and inference. You will use all three Swagger UIs throughout the tutorials.

Service Key
Service Key

For this tutorial, copy the URL of the Swagger UI for dm and open it in a browser tab.

After finishing this tutorial, keep the Swagger UI for dm open to perform the clean up tasks in Use the Regression Model Template to Predict Data Records.

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

    Authorize
    Authorize

  2. Get the access_token value created in the previous tutorial: Get OAuth Access Token for Data Attribute Recommendation Using Any Web Browser, then add Bearer (with capitalized “B”) in front of it, and enter in the Value field.

    Code
    Bearer <access_token>
  3. Click Authorize and then click Close.

    Authorize
    Authorize

Step 2 Create dataset schema
+
Step 3 Create dataset
+
Step 4 Upload data
+
Step 5 Check dataset status
+

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. Create dataset schema 3. Create dataset 4. Upload data 5. Check dataset status

Learn more →