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 Data Attribute Recommendation With Your Own Dataset

Classify your own data records in Data Attribute Recommendation using a custom dataset schema.

Overview

🎓 intermediate 30 min. Machine LearningIntermediateArtificial IntelligenceCloudSAP Business Technology PlatformSAP Ai ServicesData Attribute Recommendation

You will learn

  • โœ”How to define a custom dataset schema
  • โœ”How to prepare your data for upload
  • โœ”How to classify your own data records using your Data Attribute Recommendation machine learning model
Juliana Morais J Juliana Morais December 11, 2023
Created by January 13, 2020
Contributors

Prerequisites

Steps

Intro

In this tutorial, you will use machine learning to classify your own data records and prepare a corresponding dataset schema. The steps that you have already learned in the previous tutorials will be once again needed to perform this tutorial. You will be given instructions, but if you need more details for each task, please review the respective tutorial.

Please note that the free tier option for Data Attribute Recommendation has limits on number of schemas, datasets and models. In order to be able to run this tutorial end-to-end without hitting limits, it is recommended to perform a cleanup as described in the tutorial: Use Data Attribute Recommendation to Classify Records, Delete Model and Dataset. See also Free Tier Option Technical Constraints.


Step 1 Prepare your data
โ€”

In order to use your own dataset, you need to define a dataset schema that fits your dataset.

In your dataset, you need to decide which columns will be features, for example the inputs for the machine learning model and which columns will be labels, for example the fields that will be predicted by the machine learning model. For further definition of specific terms, see Concepts.

After you have defined the features and the labels, you will need to note down your dataset schema. Paste the example below into a text file and adapt it to your needs.

Each column in your dataset is represented by a label (that is not a label in machine learning sense but rather a field name) and a type. The available types are category, text and number. Assign the correct type to each of your features and labels. Please find further description on each type in the FAQ under What kinds of training data can be processed by Data Attribute Recommendation?

Note that in labels section only category types are allowed.

Now that you have created your dataset schema, make sure that you save the file.

JSON
{
  "features": [
      {
          "label": "description",
          "type": "text"
      },
      {
          "label": "manufacturer",
          "type": "category"
      },
      {
          "label": "price",
          "type": "number"
      }
  ],
  "labels": [
      {
          "label": "level1_category",
          "type": "category"
      },
      {
          "label": "level2_category",
          "type": "category"
      },
      {
          "label": "level3_category",
          "type": "category"
      }
  ],
  "name": "my-dataset-schema"
}

Last but not least, you have to make sure that your dataset meets the prerequisites. The dataset has to:

  • be in the CSV format

  • use comma “,” as delimiter

  • use UTF-8 encoding

  • include all the features and labels you have defined in your dataset schema as data columns

  • include no fields that are not used in your dataset schema

You can use this dataset as a reference.

Step 2 Create new dataset schema
+
Step 3 Create new dataset
+
Step 4 Upload your data
+
Step 5 Create training job and deploy your model
+
Step 6 Classify records
+

Resources

Discussion

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

Submit detailed feedback Discuss in Community
Steps
Step 1 of 6
1. Prepare your data 2. Create new dataset schema 3. Create new dataset 4. Upload your data 5. Create training job and deploy your model 6. Classify records

Learn more →