Table of Contents

Search

  1. Preface
  2. Transformations
  3. Source transformation
  4. Target transformation
  5. Access Policy transformation
  6. Aggregator transformation
  7. B2B transformation
  8. Cleanse transformation
  9. Data Masking transformation
  10. Data Services transformation
  11. Deduplicate transformation
  12. Expression transformation
  13. Filter transformation
  14. Hierarchy Builder transformation
  15. Hierarchy Parser transformation
  16. Hierarchy Processor transformation
  17. Input transformation
  18. Java transformation
  19. Java transformation API reference
  20. Joiner transformation
  21. Labeler transformation
  22. Lookup transformation
  23. Machine Learning transformation
  24. Mapplet transformation
  25. Normalizer transformation
  26. Output transformation
  27. Parse transformation
  28. Python transformation
  29. Rank transformation
  30. Router transformation
  31. Rule Specification transformation
  32. Sequence transformation
  33. Sorter transformation
  34. SQL transformation
  35. Structure Parser transformation
  36. Transaction Control transformation
  37. Union transformation
  38. Velocity transformation
  39. Verifier transformation
  40. Web Services transformation

Transformations

Transformations

Machine Learning transformation example

Machine Learning transformation example

You're a data scientist at a popular video streaming site and you need to generate a report on which users are likely to cancel their subscription so the marketing team can target their upcoming ad campaign.
You built a machine learning model to predict how likely users are to cancel their subscription based on their watch history, content preferences, and other user data. Your company stores this user data in a cloud data lake. To generate the report, you'll create a mapping to read from the data lake, pass the data through the machine learning model, and filter out results that aren't important to the marketing campaign.
Before you create the mapping, you set up a REST endpoint for the machine learning model. You also create an API collection with a POST request in
Data Integration
.
Then, you create a mapping that includes a Machine Learning transformation and a Filter transformation. The following image shows an overview of the mapping: The mapping canvas shows a mapping that includes a Source transformation, Machine Learning transformation, Filter transformation, and Target transformation.
You configure the transformations in the following ways:
Machine Learning transformation
On the
Model
tab, select a POST request from your API collection as the operation and select the connection to the machine learning model. The following image shows the configured
Model
tab: The Model tab of the Machine Learning transformation shows a POST operation selected and a REST V3 connection to the machine learning model.
On the
Request Mapping
tab, verify that the mapping of the incoming field from the Source transformation to the request schema field is correct. If needed, manually map the fields. The following image shows the configured
Request Mapping
tab: The Request Mapping tab of the Machine Learning transformation properties shows one incoming field, named source_data, mapped to the request schema field, named data.
Filter transformation
Since the marketing team is only interested in users who are unlikely to renew their subscription, set the filter condition to filter for users who have a probability of renewing less than 50%. The following image shows the configured filter condition: The Filter tab of the Filter transformation properties includes a simple filter condition.
When you run the mapping, it reads user data from the cloud data lake. The Machine Learning transformation makes a REST API call to pass the data through the request schema fields to the machine learning model. The model generates predictions about each user's likelihood of renewing, and the Machine Learning transformation captures the predictions in the response schema fields. The Machine Learning transformation passes the results to the Filter transformation, which filters out users who are likely to renew and passes users who are unlikely to renew to the Target transformation. The Target transformation writes the results to the target file, which you can send over to the marketing team.

0 COMMENTS

We’d like to hear from you!