An Amazon SageMaker training job is a reiterative method that teaches a model to form predictions by presenting examples from a training dataset.
This blog will cover some quick tips including FAQs on the topics that we covered in the Day 9 & 10 live sessions which will help you to clear Certification [MLS-C01] & get a better-paid job.
The previous week, In Day 7 & 8 sessions we got an overview of Modeling in AWS, Artificial Intelligence in AWS, and Introduction to SageMaker. And in this week Day 9 & 10, we covered the concepts of SageMaker Built-in Algorithms, Model Training & Tuning, and Model Deployment. We also performed some Hands-on Image Classification Algorithm, Linear Learner Algorithm from 30+ extensive labs.
So, here are some of the FAQ’s that help you keep you in pace with us from the Live session from Module 10: SageMaker Built-in Algorithm
> Introduction to SageMaker
Amazon SageMaker is a fully managed machine learning service. With Amazon SageMaker, data scientists and developers can quickly and easily build and train machine learning models, and then directly deploy them into a production-ready hosted environment.
Q1: How Machine learning with SageMaker works?
A: In machine learning, you “teach” a pc to form predictions or inferences. First, you utilize an algorithmic program and example data to train a model. Then you integrate your model into your application to come up with inferences in a period of time and at scale. in an exceeding production setting, a model usually learns from innumerable example data items and produces inferences in a whole lot to but twenty milliseconds.
The following diagram illustrates the everyday workflow for making a machine learning model:
Source: AWS
A: To pre-process data, use one of the following methods:
Use a Jupyter notebook on an Amazon SageMaker notebook instance to do the following:
- Write code to create model training jobs
- Deploy models to SageMaker hosting
- Test or validate your models
Q3: What is the image classification algorithm in Amazon SageMaker?
A: The Amazon SageMaker image classification algorithm is a supervised learning algorithm that supports multi-label classification. It takes an image as input and outputs one or more labels assigned to that image. It uses a convolutional neural network (ResNet) that can be trained from scratch or trained using transfer learning when a large number of training images are not available. (top fully-connected layer is initialized with random weights). The counseled input format for the Amazon SageMaker image classification algorithms is Apache MXNet RecordIO. However, you’ll be able to conjointly use raw pictures in .jpg or .png format.
Default image size is 3-channel 224×224 (ImageNet’s dataset)
Q4: What is Random Cut Forest (RCF) algorithm?
A: RCF is used for Anomaly detection. It is Unsupervised learning and Detects unexpected spikes in time series data and also Breaks in periodicity.
Separates Unclassifiable data points also Assigns an anomaly score to each data point
Q5: Is RCF is unsupervised Learning, if yes then how can we have accuracy and F1 score for unsupervised?
A: Yes, RCF is unsupervised learning and unsupervised learning is not good for calculating accuracy and F1 score. But Random cut forest from AWS has an optional test channel where you calculate accuracy and F1 score, RCF requires a labeled test dataset for hyperparameter optimization. RCF calculates anomaly scores for test data points and then labels the datapoints as anomalous if their scores are beyond three standard deviations from the mean score.
For example: Considering the F1 score, it is based on the difference between calculated labels and actual labels.
Q6: What is Linear Learner Algorithm?
A: Linear Learner models are supervised learning algorithms used for solving either classification or regression problems.
For input, you give the model labeled examples (x, y), x is a high-dimensional vector and y is a numeric label.
For binary classification problems, the label must be either 0 or 1
For multiclass classification problems, the labels must be from 0 to num_classes – 1
For regression problems, y is a real number.
The algorithm learns a linear function, or, for classification problems, a linear threshold function, and maps a vector x to an approximation of the label y.
Q7: Are the projects we do end to end and multiple model test ingestion to deployment?
A: Yes, All SageMaker projects that we did are end to end, Considering Build, Training, and deploy. We have deployed all our trained Machine Learning models in a Production-ready environment.
Q8: Explain array in np.array split(test_set[0],100)
A: Split array into multiple sub-arrays of equal size.
array_split() for splitting arrays, we pass it the array we want to split and the number of splits.For Example:import numpy as nparr = np.array([1, 2, 3, 4, 5, 6])newarr = np.array_split(arr, 3)print(newarr)
Output[array([1, 2]), array([3, 4]), array([5, 6])]So, we split our test_set into 100 splits, before we make predictions
> Model Training and Tuning
An Amazon SageMaker training job is a reiterative method that teaches a model to form predictions by presenting examples from a training dataset.
Q9: How to train a model with Amazon SageMaker?
A: The following diagram shows, however, you train and deploy a model with Amazon SageMaker:
Source: AWS
The area labeled SageMaker highlights the two components of SageMaker: model training and model deployment.
To train a model in SageMaker, you create a training job. The training job includes the subsequent information:
- The uniform resource locator of the Amazon Simple Storage Service (Amazon S3) bucket wherever you have kept the training data.
- The compute resources that you just need SageMaker to use for model training. compute resources are ml compute instances that are managed by SageMaker.
- The uniform resource locator of the S3 bucket wherever you wish to store the output of the work.
- The Amazon Elastic container registry path wherever the training code is stored
Q10: How to monitor and analyze training jobs?
A: An Amazon SageMaker training job is a reiterative method that teaches a model to form predictions by presenting examples from a training dataset. Typically, a training algorithm computes many metrics, like training error and prediction accuracy. These metrics facilitate diagnosis whether or not the model is learning well and can generalize well for creating predictions on unseen data. The training algorithm writes the values of those metrics to logs, that SageMaker monitors and sends to Amazon CloudWatch in a period of time. to research the performance of your training job, you’ll be able to read graphs of those metrics in CloudWatch.
Q11: What is hyperparameter Tuning?
A: In machine learning, a hyperparameter may be a parameter whose worth is employed to regulate the training method. in contrast, the values of different parameters area unit derived via coaching.
Q12: How to Deploy a model in Amazon Sagemaker?
A: After you train your model, you can deploy it using Amazon SageMaker to get predictions in any of the following ways:
- To set up a persistent terminus to induce one prediction at a time, use SageMaker hosting services.
- To get predictions for a whole dataset, use SageMaker batch remodel.
Deploying a model using SageMaker hosting services is a three-step process:
- Create a model in SageMaker
- Create an endpoint configuration for an HTTPS endpoint
- Create an HTTPS endpoint
Q13: What is Automatic Scaling?
A: Autoscaling dynamically adjusts the number of instances provisioned for a model in response to changes in your workload. Once the work will increase, autoscaling brings additional instances on-line. once the work decreases, autoscaling removes reserve instances in order that you do not get hold of provisioned instances that you just are not using.
Q14: What is Elastic Interference?
A: By using Amazon Elastic Inference (EI), you’ll be able to speed up the turnout and reduce the latency of obtaining period of time inferences from your deep learning models that area unit deployed as Amazon SageMaker hosted models. however at a fraction of the price of employing a GPU instance for your terminus. EI permits you to feature inference acceleration to a hosted terminus for a fraction of the price of employing a full GPU instance.
Feedback Received…
From our AWS-ML Day 7 & day 8 session, we received some good feedback from our trainees who had attended the session, so here is a sneak peek of it.
To know more about AWS-ML certification and whether it is the right certification for you, read our blog on AWS Certified Machine Learning – Specialty[MLS-C01]: Everything you must know
Quiz Time (Sample Exam Questions)!
With our AWS Certified Machine Learning – Specialty training program, we cover 150+ sample exam questions to help you prepare for the certification [MLS-C01].
Check out one of the questions and see if you can crack this…
Ques: You work as a machine learning specialist for a company that runs car rating website. Your company wants to build a price prediction model that is more accurate than their current model, which is a linear regression model using the age of the car as the single independent variable in the regression to predict the price. You have decided to add the horsepower, fuel type, city mpg (miles per gallon), drive wheels, and a number of doors as independent variables in your model. You believe that adding these additional independent variables will give you a more accurate prediction of price.
Which type of algorithm will you now use for your prediction?
A. Logistic Regression
B. Decision Tree
C. Naive Bayes
D. Multivariate Regression
Comment with your answer & we will tell you if you are correct or not!!
Related/References
- Amazon SageMaker Built-in Algorithms – Introduction
- AWS SageMaker: Modeling With AWS Machine Learning
- AWS Certified Machine Learning Specialty: All You Need To Know
- AWS Certified Machine Learning – Specialty: Step-by-Step Hands-On
- Exploratory Data Analysis With AWS Machine Learning
- [MLS-C01] AWS Certified Machine Learning – Specialty QnA Day 1 & 2 Live Session Review
- [MLS-C01] AWS Certified Machine Learning – Specialty QnA Day 3 & 4 Live Session Review
- [MLS-C01] AWS Certified Machine Learning – Specialty QnA Day 5 & 6 Live Session Review
- [MLS-C01] AWS Certified Machine Learning – Specialty QnA Day 7 & 8 Live Session Review
Next Task For You
If you are also interested and want to more about the AWS certified Machine Learning Specialist then join the Waitlist.
Leave a Reply