Saturday, May 17, 2025
News PouroverAI
Visit PourOver.AI
No Result
View All Result
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing
News PouroverAI
No Result
View All Result

Use Amazon DocumentDB to build no-code machine learning solutions in Amazon SageMaker Canvas

December 15, 2023
in Data Science & ML
Reading Time: 5 mins read
0 0
A A
0
Share on FacebookShare on Twitter



We are excited to announce the launch of Amazon DocumentDB (with MongoDB compatibility) integration with Amazon SageMaker Canvas, allowing Amazon DocumentDB customers to build and use generative AI and machine learning (ML) solutions without writing code. Amazon DocumentDB is a fully managed native JSON document database that makes it straightforward and cost-effective to operate critical document workloads at virtually any scale without managing infrastructure. Amazon SageMaker Canvas is a no-code ML workspace offering ready-to-use models, including foundation models, and the ability to prepare data and build and deploy custom models.

In this post, we discuss how to bring data stored in Amazon DocumentDB into SageMaker Canvas and use that data to build ML models for predictive analytics. Without creating and maintaining data pipelines, you will be able to power ML models with your unstructured data stored in Amazon DocumentDB.

Solution overview
Let’s assume the role of a business analyst for a food delivery company. Your mobile app stores information about restaurants in Amazon DocumentDB because of its scalability and flexible schema capabilities. You want to gather insights on this data and build an ML model to predict how new restaurants will be rated, but find it challenging to perform analytics on unstructured data. You encounter bottlenecks because you need to rely on data engineering and data science teams to accomplish these goals. This new integration solves these problems by making it simple to bring Amazon DocumentDB data into SageMaker Canvas and immediately start preparing and analyzing data for ML. Additionally, SageMaker Canvas removes the dependency on ML expertise to build high-quality models and generate predictions.

We demonstrate how to use Amazon DocumentDB data to build ML models in SageMaker Canvas in the following steps:
1. Create an Amazon DocumentDB connector in SageMaker Canvas.
2. Analyze data using generative AI.
3. Prepare data for machine learning.
4. Build a model and generate predictions.

Prerequisites
To implement this solution, complete the following prerequisites:
1. Have AWS Cloud admin access with an AWS Identity and Access Management (IAM) user with permissions required to complete the integration.
2. Complete the environment setup using AWS CloudFormation through either of the following options:
a. Deploy a CloudFormation template into a new VPC – This option builds a new AWS environment that consists of the VPC, private subnets, security groups, IAM execution roles, Amazon Cloud9, required VPC endpoints, and SageMaker domain. It then deploys Amazon DocumentDB into this new VPC. Download the template or quick launch the CloudFormation stack by choosing Launch Stack.
b. Deploy a CloudFormation template into an existing VPC – This option creates the required VPC endpoints, IAM execution roles, and SageMaker domain in an existing VPC with private subnets. Download the template or quick launch the CloudFormation stack by choosing Launch Stack. Note that if you’re creating a new SageMaker domain, you must configure the domain to be in a private VPC without internet access to be able to add the connector to Amazon DocumentDB. To learn more, refer to Configure Amazon SageMaker Canvas in a VPC without internet access.
3. Follow the tutorial to load sample restaurant data into Amazon DocumentDB.
4. Add access to Amazon Bedrock and the Anthropic Claude model within it. For more information, see Add model access.

Create an Amazon DocumentDB connector in SageMaker Canvas
After you create your SageMaker domain, complete the following steps:
1. On the Amazon DocumentDB console, choose No-code machine learning in the navigation pane.
2. Under Choose a domain and profile¸ choose your SageMaker domain and user profile.
3. Choose Launch Canvas to launch SageMaker Canvas in a new tab. When SageMaker Canvas finishes loading, you will land on the Data flows tab.
4. Choose Create to create a new data flow.
5. Enter a name for your data flow and choose Create.
6. Add a new Amazon DocumentDB connection by choosing Import data, then choose Tabular for Dataset type.
7. On the Import data page, for Data Source, choose DocumentDB and Add Connection.
8. Enter a connection name such as demo and choose your desired Amazon DocumentDB cluster. Note that SageMaker Canvas will prepopulate the drop-down menu with clusters in the same VPC as your SageMaker domain.
9. Enter a user name, password, and database name. Finally, select your read preference. To protect the performance of primary instances, SageMaker Canvas defaults to Secondary, meaning that it will only read from secondary instances. When read preference is Secondary preferred, SageMaker Canvas reads from available secondary instances, but will read from the primary instance if a secondary instance is not available. For more information on how to configure an Amazon DocumentDB connection, see the Connect to a database stored in AWS.
10. Choose Add connection. If the connection is successful, you will see collections in your Amazon DocumentDB database shown as tables.
11. Drag your table of choice to the blank canvas. For this post, we add our restaurant data. The first 100 rows are displayed as a preview.
12. To start analyzing and preparing your data, choose Import data. Enter a dataset name and choose Import data.

Analyze data using generative AI
Next, we want to get some insights on our data and look for patterns. SageMaker Canvas provides a natural language interface to analyze and prepare data. When the Data tab loads, you can start chatting with your data by following these steps:
1. Choose Chat for data prep.
2. Gather insights about your data by asking questions like the samples shown in the following screenshots. To learn more about how to use natural language to explore and prepare data, refer to Use natural language to explore and prepare data with a new capability of Amazon SageMaker Canvas.
3. Let’s get a deeper sense of our data quality by using the SageMaker Canvas Data Quality and Insights Report, which automatically evaluates data quality and detects abnormalities.
4. On the Analyses tab, choose Data Quality and Insights Report.
5. Choose rating as the target column and Regression as the problem type, then choose Create. This will simulate model training and provide insights on how we can improve our data for machine learning.
6. The complete report is generated in a few minutes. Our report shows that 2.47% of rows in our target have missing values—we’ll address that in the next step. Additionally, the analysis shows that the address line 2, name, and type_of_food features have the most prediction power in our data. This indicates basic restaurant information like location and cuisine may have an outsized impact on ratings.

Prepare data for machine learning
SageMaker Canvas offers over 300 built-in transformations to prepare your imported data. For more information on transformation features of SageMaker Canvas, refer to Prepare data with advanced transformations. Let’s add some transformations to get our data ready for training an ML model. Follow these steps:
1. Navigate back to the Data flow page by choosing the name of your data flow at the top of the page.
2. Choose the plus sign next to Data types and choose Add transform.
3. Choose Add step. Let’s rename the address line 2 column to cities. Choose Manage columns.
4. Choose Rename column for Transform.
5. Choose address line 2 for Input column, enter cities for New name, and choose Add.
6. Additionally, let’s drop some unnecessary columns. Add a new transform.
7. For Transform, choose Drop column. For Columns to drop, choose URL and restaurant_id. Choose Add.
8. Our rating feature column has some missing values, so let’s fill in those rows with the average value of this column. Add a new transform.
9. For Transform, choose Impute. For Column type, choose Numeric. For Input columns, choose the rating column. For Imputing strategy, choose Mean. For Output column, enter rating_avg_filled. Choose Add.
10. We can drop the rating column because we have a new column with filled values. Because type_of_food is categorical in nature, we’ll want to numerically encode it. Let’s encode this feature using the one-hot encoding technique. Add a new transform.
11. For Transform, choose One-hot encode. For Input columns, choose type_of_food. For Invalid handling strategy, choose Keep. For Output style, choose Columns. For Output column, enter encoded. Choose Add.

Build a model and generate predictions
Now that we have transformed our data, let’s train a numeric ML model to predict the ratings for restaurants. Follow these steps:
1. Choose Create model.
2. For Dataset name, enter a name for the dataset export.
3. Choose Export and wait for the transformed data to be exported.
4. Choose the Create model link at the bottom left corner of the page. You can also select the dataset from the Data Wrangler feature on the…



Source link

Tags: AmazonBuildCanvasDocumentDBLearningMachinenocodeSageMakerSolutions
Previous Post

‘Neither Governor nor Revanth Reddy spent a day in jail…’: BRS leader slams Soundararajan’s ‘Liberation of Telangana’ speech

Next Post

Unlocking the potential of AI on edge devices

Related Posts

AI Compared: Which Assistant Is the Best?
Data Science & ML

AI Compared: Which Assistant Is the Best?

June 10, 2024
5 Machine Learning Models Explained in 5 Minutes
Data Science & ML

5 Machine Learning Models Explained in 5 Minutes

June 7, 2024
Cohere Picks Enterprise AI Needs Over ‘Abstract Concepts Like AGI’
Data Science & ML

Cohere Picks Enterprise AI Needs Over ‘Abstract Concepts Like AGI’

June 7, 2024
How to Learn Data Analytics – Dataquest
Data Science & ML

How to Learn Data Analytics – Dataquest

June 6, 2024
Adobe Terms Of Service Update Privacy Concerns
Data Science & ML

Adobe Terms Of Service Update Privacy Concerns

June 6, 2024
Build RAG applications using Jina Embeddings v2 on Amazon SageMaker JumpStart
Data Science & ML

Build RAG applications using Jina Embeddings v2 on Amazon SageMaker JumpStart

June 6, 2024
Next Post
Unlocking the potential of AI on edge devices

Unlocking the potential of AI on edge devices

Researchers from Karlsruhe Institute of Technology (KIT) Advance Precipitation Mapping with Deep Learning for Improved Spatial and Temporal Resolution

Researchers from Karlsruhe Institute of Technology (KIT) Advance Precipitation Mapping with Deep Learning for Improved Spatial and Temporal Resolution

⚠️ Bitcoin BTC MASSIVE LIQUIDATIONS ⚠️

⚠️ Bitcoin BTC MASSIVE LIQUIDATIONS ⚠️

Leave a Reply Cancel reply

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

  • Trending
  • Comments
  • Latest
Is C.AI Down? Here Is What To Do Now

Is C.AI Down? Here Is What To Do Now

January 10, 2024
Porfo: Revolutionizing the Crypto Wallet Landscape

Porfo: Revolutionizing the Crypto Wallet Landscape

October 9, 2023
23 Plagiarism Facts and Statistics to Analyze Latest Trends

23 Plagiarism Facts and Statistics to Analyze Latest Trends

June 4, 2024
A Complete Guide to BERT with Code | by Bradney Smith | May, 2024

A Complete Guide to BERT with Code | by Bradney Smith | May, 2024

May 19, 2024
Part 1: ABAP RESTful Application Programming Model (RAP) – Introduction

Part 1: ABAP RESTful Application Programming Model (RAP) – Introduction

November 20, 2023
Saginaw HMI Enclosures and Suspension Arm Systems from AutomationDirect – Library.Automationdirect.com

Saginaw HMI Enclosures and Suspension Arm Systems from AutomationDirect – Library.Automationdirect.com

December 6, 2023
Can You Guess What Percentage Of Their Wealth The Rich Keep In Cash?

Can You Guess What Percentage Of Their Wealth The Rich Keep In Cash?

June 10, 2024
AI Compared: Which Assistant Is the Best?

AI Compared: Which Assistant Is the Best?

June 10, 2024
How insurance companies can use synthetic data to fight bias

How insurance companies can use synthetic data to fight bias

June 10, 2024
5 SLA metrics you should be monitoring

5 SLA metrics you should be monitoring

June 10, 2024
From Low-Level to High-Level Tasks: Scaling Fine-Tuning with the ANDROIDCONTROL Dataset

From Low-Level to High-Level Tasks: Scaling Fine-Tuning with the ANDROIDCONTROL Dataset

June 10, 2024
UGRO Capital: Targeting to hit milestone of Rs 20,000 cr loan book in 8-10 quarters: Shachindra Nath

UGRO Capital: Targeting to hit milestone of Rs 20,000 cr loan book in 8-10 quarters: Shachindra Nath

June 10, 2024
Facebook Twitter LinkedIn Pinterest RSS
News PouroverAI

The latest news and updates about the AI Technology and Latest Tech Updates around the world... PouroverAI keeps you in the loop.

CATEGORIES

  • AI Technology
  • Automation
  • Blockchain
  • Business
  • Cloud & Programming
  • Data Science & ML
  • Digital Marketing
  • Front-Tech
  • Uncategorized

SITEMAP

  • Disclaimer
  • Privacy Policy
  • DMCA
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact us

Copyright © 2023 PouroverAI News.
PouroverAI News

No Result
View All Result
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing

Copyright © 2023 PouroverAI News.
PouroverAI News

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In