From the course: Debiasing AI Using Amazon SageMaker
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Invoke the crime model
From the course: Debiasing AI Using Amazon SageMaker
Invoke the crime model
- [Instructor] Now that we have all of the attributes needed by our crime fighting model to predict crime, let's send them to our model and obtain a crime prediction. Let's navigate to the AWS Lambda console. This is the code that we looked at in the previous lesson, so let's pick up where we left off. On lines 46 through 51, I provided some very useful comments. These comments show examples of the payload, or the data sent to the model. Notice that the payload consists of numbers that are either one or zero. One stands for yes, or true, and zero stands for false, or no. We also have numbers that indicate the day of the week, the month, and the average age. This payload maps back exactly to the CSV file format that was used to train our model with, minus the target, or the answer. In this case, the target comes back from the model. Down here on line 53, I'm creating the payload by calling this create_payload function. Let's take a look at this function. Scroll down to line 80. On line…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.