We’re excited to announce that Amazon SageMaker Canvas now offers a faster, easier-to-use way to build machine learning models for time series forecasting. SageMaker Canvas is a visual point-and-click service that allows business analysts to generate accurate machine learning (ML) models without requiring any machine learning experience or having to write a single line of code.
SageMaker Canvas supports a number of use cases, including time series forecasting used for inventory management in retail, demand planning in manufacturing, workforce and guest planning in travel, and hospitality, revenue forecasting in finance, and many other business-critical decisions where accurate forecasts are highly important. For example, time series forecasting allows retailers to predict future sales demand and plan inventory levels, logistics, and marketing campaigns. Time series forecasting models in SageMaker Canvas use advanced technologies to combine statistical and machine learning algorithms to deliver highly accurate forecasts.
In this post, we describe enhancements to SageMaker Canvas’s forecasting capabilities and guide you through using its user interface (UI) and AutoML APIs for time series forecasting. While the SageMaker Canvas user interface offers a code-free visual interface, APIs allow developers to interact with these features programmatically. Both can be accessed from the SageMaker console.
Improvements to the forecasting experience.
With today’s release, SageMaker Canvas has updated its forecasting capabilities using AutoML, delivering up to 50 percent faster modeling performance and up to 45 percent faster predictions on average compared to previous versions across multiple ensembles. of reference data. This reduces the average model training duration from 186 to 73 minutes and the average prediction time from 33 to 18 minutes for a typical batch of 750 time series with a data size of up to 100 MB. Users can now also programmatically access model building and prediction capabilities through Amazon SageMaker Autopilot APIs, which come with model performance and explainability reporting.
Previously, introducing incremental data required retraining the entire model, which was time-consuming and caused operational delays. Now, in SageMaker Canvas, you can add recent data to generate future forecasts without retraining the entire model. Simply feed your incremental data into your model to use the latest insights for upcoming forecasts. Eliminating retraining speeds up the forecasting process, allowing you to more quickly apply those results to your business processes.
Now that SageMaker Canvas uses AutoML for forecasting, you can take advantage of prediction and modeling capabilities through the SageMaker Autopilot APIs, ensuring consistency between the user interface and APIs. For example, you can start by creating models in the UI and then move to using APIs to generate predictions. This updated modeling approach also improves model transparency in several ways:
- Users can access an explainability report that provides clearer insights into the factors influencing predictions. This is valuable to risk teams, compliance and external regulators. The report clarifies how dataset attributes influence forecasts for specific time series. Is used impact scores to measure the relative effect of each attribute, indicating whether they amplify or reduce the predicted values.
- You can now access the trained models and deploy them to SageMaker Inference or your preferred infrastructure for predictions.
- A performance report is available that provides deeper insights into the optimal models chosen by AutoML for specific time series and the hyperparameters used during training.
Generate time series forecasts using the SageMaker Canvas user interface
The SageMaker Canvas user interface allows you to seamlessly integrate data sources from the cloud or on-premises, effortlessly merge data sets, train accurate models, and make predictions with emerging data, all without coding. Let’s explore generating a time series forecast using this user interface.
First, you import data into SageMaker Canvas from multiple sources, including local files on your computer, Amazon Simple Storage Service (Amazon S3) buckets, Amazon Athena, Snowflake, and more than 40 other data sources. After you import data, you can explore and visualize it for additional information, such as scatterplots or bar charts. Once you are ready to create a model, you can do so with just a few clicks after setting the necessary parameters, such as selecting a target column to forecast and specifying how many days in the future you want to forecast. The following screenshots show an example of viewing product demand prediction based on historical weekly demand data for specific products at different store locations:
The image below shows weekly forecasts for a specific product across different store locations:
For a complete guide on how to use the SageMaker Canvas user interface for forecasting, see this blog post.
If you need an automated workflow or direct machine learning model integration into applications, you can access our forecasting capabilities via API. In the next section, we provide a sample solution that details how to employ our APIs for automated forecasting.
Generate time series forecasts using API
Let’s dive into how to use APIs to train the model and generate predictions. For this demonstration, consider a situation where a company needs to predict product stock levels at various stores to meet customer demand. At a high level, API interactions are broken down into the following steps:
- Prepare the data set.
- Create a SageMaker Autopilot job.
- Evaluate the work of the autopilot:
- Explore model accuracy metrics and backtest results.
- Explore the model explainability report.
- Generate predictions from the model:
- Use the real-time inference endpoint created as part of the Autopilot job; either
- Use a batch transformation job.
Amazon SageMaker Studio notebook example showing forecasting with API
We provide a sample SageMaker Studio notebook at GitHub to help accelerate your time to market when your company prefers to orchestrate forecasting through programmatic APIs. The notebook provides a sample synthetic data set available through a public S3 repository. The notebook guides you through all the steps outlined in the workflow image mentioned above. While the notebook provides a basic framework, you can adapt the sample code to fit your specific use case. This includes modifying it to match your unique data schema, time resolution, forecast horizon, and other parameters necessary to achieve the desired results.
Conclusion
SageMaker Canvas democratizes time series forecasting by offering an easy-to-use, no-code experience that enables business analysts to create highly accurate machine learning models. With current AutoML updates, it delivers up to 50 percent faster model building, up to 45 percent faster predictions, and introduces API access to both model building and prediction functions, improving transparency. and coherence. SageMaker Canvas’s unique ability to seamlessly handle incremental data without retraining ensures rapid adaptation to ever-changing business demands.
Whether you prefer the intuitive user interface or versatile APIs, SageMaker Canvas simplifies data integration, model training, and prediction, making it a critical tool for innovation and data-driven decision making in all industries.
For more information, review the documentation or explore the laptop available in our GitHub repository. Pricing information for time series forecasting using SageMaker Canvas is available on the SageMaker Canvas pricing page, and for SageMaker training and inference pricing when using the SageMaker Autopilot APIs, see the SageMaker Canvas pricing page. SageMaker.
These capabilities are available in all AWS Regions where SageMaker Canvas and SageMaker Autopilot are publicly accessible. For more information about regional availability, see AWS Services by Region.
About the authors
Nirmal Kumar is a senior product manager for the Amazon SageMaker service. Committed to expanding access to ai/ML, he leads the development of no-code and low-code ML solutions. Outside of work, he enjoys traveling and reading nonfiction.
Carlos Laughlin is a Principal Solutions Architect specializing in ai/ML working on the Amazon SageMaker Service Team on AWS. He helps shape the service roadmap and collaborates daily with diverse AWS customers to help them transform their businesses using cutting-edge AWS technologies and thought leadership. Charles has a master’s degree in Supply Chain Management and a Ph.D. in Data Science.
Ridhim Rastogi Software development engineer working on the Amazon SageMaker service team on AWS. He is passionate about building scalable distributed systems with a focus on solving real-world problems through ai/ML. In his free time, he likes to solve puzzles, read fiction, and explore his surroundings.
Ahmed Raafat is a Principal Solutions Architect at AWS, with 20 years of field experience and a 5-year dedicated focus within the AWS ecosystem. He specializes in ai/ML solutions. His extensive experience spans across various industry verticals, making him a trusted advisor to numerous enterprise clients, facilitating them to seamlessly navigate and accelerate their cloud journey.
John Oshodi is a Senior Solutions Architect at Amazon Web Services based in London, UK. He specializes in data and analytics and serves as a technical advisor to numerous AWS enterprise customers, supporting and accelerating their journey to the cloud. Outside of work, he enjoys traveling to new places and experiencing new cultures with his family.