This Guidance helps you use machine learning (ML) to forecast demand in restaurants so you can optimize staff scheduling. Additionally, forecasting demand can help you reduce inventory, more effectively use resources, increase revenue, and reduce waste. This Guidance includes an end-to-end pipeline for data to show you how to analyze data and present it in a format that non-technical users can interact with to derive business insights.
Please note: [Disclaimer]
Architecture Diagram
[Architecture diagram description]
Step 1
Export dynamic and static data from front of house systems in CSV or Excel format or to other restaurant management systems.
Step 2
Upload structured files with pre-defined schemas to Amazon Simple Storage Service (Amazon S3) using AWS Transfer Family. You can access optional data through AWS Data Exchange (for local events) or Amazon AppFlow (for promotions).
Step 3
AWS Glue Crawler creates an AWS Glue Data Catalog after transforming the raw data. The AWS Glue Data Catalog puts data in a format that Amazon SageMaker Canvas can consume.
Step 4
Using AWS Lambda, SageMaker Canvas and AWS Step Functions build and train a SageMaker Canvas model known as a predictor:
a. Step Functions orchestrates the ingestion of processed data for SageMaker Canvas.
b. Processed data helps train the SageMaker Canvas predictor.
c. The predictor then makes predictions about a pre-configured future period and publishes the outputs to Amazon S3.
Step 5
Amazon Athena queries the final forecast data and creates reports that Amazon QuickSight accesses.
Step 6
QuickSight uses the forecasted data to visualize and create analytics dashboards for non-technical users.
Well-Architected Pillars
The AWS Well-Architected Framework helps you understand the pros and cons of the decisions you make when building systems in the cloud. The six pillars of the Framework allow you to learn architectural best practices for designing and operating reliable, secure, efficient, cost-effective, and sustainable systems. Using the AWS Well-Architected Tool, available at no charge in the AWS Management Console, you can review your workloads against these best practices by answering a set of questions for each pillar.
The architecture diagram above is an example of a Solution created with Well-Architected best practices in mind. To be fully Well-Architected, you should follow as many Well-Architected best practices as possible.
-
Operational Excellence
You can update changes (such as forecast frequency and forecast horizon) to prediction configurations for SageMaker Canvas to achieve required levels of granularity and explainability of forecasting outputs.
-
Security
The permissions for each user is controlled through AWS Identity and Access Management (IAM) roles. Additionally, Transfer Family integration with Amazon S3 server-side data encryption helps secure file transfers. Although the architecture is serverless, the Lambda components can run within your virtual private cloud (VPC) and be associated to IAM roles with minimal required permissions.
-
Reliability
This architecture will scale to meet demand based on the volume of data (such as data from restaurant receipts) you upload to Transfer Family. As you scale your workloads, consider opting for user-defined schedules for SageMaker Canvas models rather than re-forecasting and re-training models for every upload. Additionally, all components of this architecture are built on event-driven patterns, meaning the system will only run when an event or change occurs in Amazon S3.
-
Performance Efficiency
You can adjust data input into the architecture through direct integrations with your own systems using Lambda. You can add more data relevant to your business use case through Data Exchange and adjust the Glue Crawler to construct modified data sets with which to forecast. You can also adjust configurations for SageMaker Canvas predictions and training on an as-needed basis. QuickSight allows you to view and compare variations of forecasts, explainability data, and accuracy metrics in one place using an intuitive user interface.
-
Cost Optimization
Using SageMaker Canvas’ price-per-use approach, you can train a predictor for under $1 USD (assuming less than 3 hours training time) and produce 1,000 forecasts on updated data for $2 USD. The architecture also benefits from using Amazon S3 for cost-effective data storage. The price of individual architecture components can be isolated by re-using existing SageMaker Canvas predictors.
This Guidance offers a low start-up cost to trial forecasting for non-technical users that can be further customized with automation as your familiarity with AWS technology grows.
-
Sustainability
By default, the architecture’s resources are only activated when there are changes in Amazon S3 buckets. Additionally, by adopting a serverless architecture, you can scale based on usage so that you consume only required resources.
Implementation Resources
A detailed guide is provided to experiment and use within your AWS account. Each stage of building the Guidance, including deployment, usage, and cleanup, is examined to prepare it for deployment.
The sample code is a starting point. It is industry validated, prescriptive but not definitive, and a peek under the hood to help you begin.
Related Content
[Title]
Disclaimer
The sample code; software libraries; command line tools; proofs of concept; templates; or other related technology (including any of the foregoing that are provided by our personnel) is provided to you as AWS Content under the AWS Customer Agreement, or the relevant written agreement between you and AWS (whichever applies). You should not use this AWS Content in your production accounts, or on production or other critical data. You are responsible for testing, securing, and optimizing the AWS Content, such as sample code, as appropriate for production grade use based on your specific quality control practices and standards. Deploying AWS Content may incur AWS charges for creating or using AWS chargeable resources, such as running Amazon EC2 instances or using Amazon S3 storage.
References to third-party services or organizations in this Guidance do not imply an endorsement, sponsorship, or affiliation between Amazon or AWS and the third party. Guidance from AWS is a technical starting point, and you can customize your integration with third-party services when you deploy the architecture.