A linear model used to classify breast cancer instances using UCI'S breast cancer diagnostic data set. Model is trained using AWS Sagemaker and invoked using Amazon API Gateway and an AWS Lambda function.
adapted from this AWS Blog Post
- Clone repository
git clone https://github.com/nogibjj/Machine-Learning-Serverless.git
- Install dependencies
make install
-
Set up AWS Permissions. More info on this can be found here
-
Run the Breast Cancer Prediction notebook inside the setup folder. This allows you to train your model and host it with an Amazon Sagemaker endpoint.
-
Now that the model & endpoint are setup, you can invoke the API by running
python invoke.py
To enter more predictions, simply change the values inside json.dumps() within this file.
- Turn off your resources! You can either run the last cell in the notebook, or do this through the AWS Management Console. On the console, you should only need to delete your endpoint and model (under Amazon Sagemaker) as the Lambda function will not incur costs unless invoked.