PAST QUESTIONS Flashcards

1
Q

Which python libraries are best for transforming data by changing raw feature vectors into a format best suited for a SageMaker batch transform job to generate a forecast?

A

Pandas + Scikit-learn

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the best python library for data wrangling and manipulating tabular data such as CSV?

A

Pandas

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What python library is the best for transforming raw feature vectors into a format suitable for downstream estimators?

A

Scikit-learn

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What python libraries would you use for data visualisation (no data transformation)?

A

Matplotlib + Plotly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What python library is used to interface with AWS services such as S3, DynamoDB SQS etc?

A

Boto3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Does Boto3 have data transformation function?

A

No, it merely interfaces with AWS services

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is best used for text tagging, classification and tokenisation but not manipulating data?

A

Natural Language Toolkit (NLTK)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the best python library for crawling websites to gather structured data?

A

Scrapy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What hyperparameter setting would you use to get SageMaker Linear Learner algorithm to produce discrete results?

A

Set predictor_type to binary_classifier

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

When using XGBoost what hyperparameter would you set and what would be its value to produce a logistic regression ?

A

Set objective to reg:logistic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What hyperparameter setting would you use to get SageMaker Linear Learner algorithm to produce quantitative results?

A

set the predictor_type to regressor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What would you use Kinesis Data Streams Naive Bayes Classifier for?

A

You wouldn’t as it does not exist. KDS has no machine learning capabilities.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

When using XGBoost what hyperparameter would you set and what would be its value to produce quantitative answers ?

A

set the objective to reg:linear

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Does Kinesis Data Analytics provide nearest neighbour?

A

No, but it does provide Hotspots on streams which detect higher than normal activity using the distance between hotspot and its nearest neighbour. It does not provide ML model update categories.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which algorithm would work well for near-real-time updates to the model?

A

Kinesis Data Analytics Random Cut Forest

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

When would you use SageMaker Random Cut Forest?

A

Large batch data sets where you don’t need to update the model frequentl

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How would you use AWS Glue in the best way to build a data schema?

A

Use Glue crawlers to crawl your ride share data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The Rekognition model is not able to recognise visitors to a building what might be the issue?

A

Face collection contents. Store multiple images of the same person with different positions, glasses and posses to make it more successful.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are Face landmarks?

A

Face landmarks are a set of salient points usually located at the corners, tips and midpoints of key facial components like eyes, lips and nose which Amazon Recognition uses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Could the Face Landmarks filter sharpness impact Rekognitions sucess?

A

No. Fade landmarks have no sharpness parameter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How could setting the confidence threshold tolerance to low impact Rekognition performance?

A

It could cause a failure in Rekognition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What Amazon service could you use to produce a dashboard instead of coding a React or Angular UI?

A

Amazon QuickSight

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

You are using a regression decision tree. As you train your model you see it is overfitting to your training data. How can you improve your situation and get better training results more efficiently?

A

Use a random forest by building multiple randomised decision trees and averaging their outputs to get the predictions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What technique could you use with a neural network to improve overfitting?

A

Use the “dropout” technique to penalise large weights and prevent overfitting

18
Q

What type of chart would you use to show the size of customer recommendations?

A

A distribution scatter chart

19
Q

What shart would you use to show how many leads where converted to customers?

A

Use a Conversion Rate KPI chart

20
Q

You need to predict the sales levels of each of the potential next products and select one with the highest predicted purchase rate? Which Type of machine learning approach should you use?

A

You are trying to solve for the greatest number of sales across the potential next products. Therefore you are solving a regression problem and should use a linear regression model.

21
Q

What strategy would you use to deal with missing data point values while attempting to maximise the accuracy of your model without introducing bias into the model.

A

Impute the missing values using a Deep Learning Strategy

22
Q

What is the issue with using the Most Frequent strategy to replace missing values in Categorical issues?

A

It can introduce bias into the data

23
Q

Which metric is best for deciding which model predicts true positives best when you have few positive cases?

A

PR Curve.

24
Q

Which metric do you use when evaluating models where both Positive and Negative are of equal importance?

A

ROC curve

25
Q

When do you use Precision?

A

When you want to figure out how positives are actually positives. TP / (TP + FP) When FP are really bad.

26
Q

When do you use Recall/sensitivity?

A

When missing positives is really bad. TP/ (TP + FN)

27
Q

When do you use Specificity?

A

TN / (TN + FP) How many negatives the model captures.

28
Q

When do you use F1 score?

A

When a combination of precision and recall is needed. When positives are actually positive and positives need to be captured.

29
Q

What is the problem with recall, Precision and normal F1-score?

A

They can be an issue when the data is unbalanced. For example cancer cases where there are few positives.

30
Q

What is a PR curve?

A

The curve between precision and recall for various threshold values. Our target is the top right corner of the graph.

31
Q

What is an ROC graph?

A

Receiver Operating Characteristic graph plotting True positive rate (RECALL) vs False Positive Rate (1-specificity). Top left is our target.

32
Q

When should you use ROC graph or PR Curve?

A

When there is a majority of negative items.

33
Q

When should you use the ROC equation?

A

When both negative and positive classifications are important and the data is unbalanced.

34
Q

When should you use the PC Curve?

A

When correctly classifying Positive items is more important than negative and the data is unbalanced.

35
Q

You have created a Glue crawler that you have configured to crawl the data on S3 and have written a custom classifier. Unfortunately the crawler failed to create a schema. Why might the Glue crawler have failed in this way?

A

All classifiers returned a certainty of 0.0

36
Q

How would you stop your Glue Crawler from crawling objects in a set directory?

A

Add an exclude pattern when you configure the data store. Give the path of the objects to be ignored relative to the include path.

37
Q

How would you tell the Glue Crawler to group compatible schemas?

A

You can create a single schema for each S3 path.

38
Q

Your training data set is in-balanced. What would you use as a preprocessing step before you create your SageMaker training job?

A

Run your training data through a preprocessing script that uses SMOTE (synthetic Minority Over Sampling Technique) - this uses K-NN algorithm to create synthetic observations to balance the data set.

39
Q

How does SageMaker Ground Truth work?

A

It uses an active learning model that is trained from human-labeled data. Any image it understands is automatically labeled. Any ambiguous data is sent to human labellers for annotation then sent back to the active learning model to retrain the model to improve accuracy incrementally.

40
Q

You want to produce real-time analysis of streaming data from IoT devices in the field where events are analysed real-time. You also need to retain the data from the IoT devices for 7 days since you cannot fail to process any events. Which approach would give the best solution to processing your streaming data.

A

Use Amazon Kinesis Data Streams and its Kinesis API PutRecords call to pass your events from your producers to your kinesis streams.

41
Q

Why do your not use Amazon Kinesis Data Stream Producer Library for real-time processing of event data?

A

Ot can occur an additional processing delay up to RecordMaxBufferedTime within the library so is not meant for real-time processing

42
Q

Why do you not use Amazon Kinesis Data Streams Client Library for real-time processing?

A

It interacts with Amazon Kinesis Data Producer library to process its data so will also suffer from a delay.

43
Q

How long can Amazon Kinesis Data Firehose store data for?

A

Amazon DF attempts to resend data for a maximum of 24 hours. For periods which need longer this is not a suitable service.

44
Q

What is the Amazon Elastic Transcoder service used for?

A

to convert video files from one format to another

45
Q

Can AWS Rekognition service send output directly to your SageMaker Model?

A

no it requires an additional component

46
Q

What is the most efficent way of taking streams from Amazon Kinesis Data Streams and transforming them with SQL or Apache Flink?

A

Amazon Kinesis Data Analytics

47
Q

Which format’s does Amazon Glue currently support as output?

A

CSV, Parquet, Avro

48
Q

Which format’s does Amazon Glue currently support as input?

A

CSV, Parquet, XML, Avro, Grok Log, ORC

49
Q

What format is the most efficent to convert data from Glue into for Hive?

A

orc

50
Q

When you stream your data through your Kinesis Firehose through to lambs then s3. you notice no data is arriving in your S3 bucket. What might be the issue?

A

Your lambda timeout value is set to default. Default is 3 seconds which is not enough time to execute transformation functions when using Kinesis Kirehose

51
Q

What are valid put_record request parameters?

A

Data