A model to predict if a person have stroke or not. Machine Learning Algorithms and Deep Learning Techniques were used to build this model.
-
GradientBoostingClassifier
-
LinearDiscriminantAnalysis
-
Random Forest Classifier.
-
Support Vector Machine.
-
ExtraTreesClassifier
-
Logistic Regression.
-
k-Nearest Neighbors.
-
AdaBoostClassifier
-
MLPClassifier
-
Decision Tree.
-
Naive Bayes.
-
Deep Learning Technique
- Tensorflow
- cross_val_score
- classification_report
- confusion_matrix
- precision_score
- accuracy_score
- recall_score
- f1_score
- Containerapp Environment
- Containerapp
- Log Analytics
- Storage Account
- Resource Group
- Managed Identity
- Docker
This article assumes
- You have a Dockerhub Account, Microsoft Azure Account and a Github Account.
- You have git installed on your local machine.
- Have authenticated into github using your cli.
- Change the name of the storage account name in
.github/workflow/main.yaml line: 17 and 14
Create Service Principle
- Create a new service principle and grant owner permission to this service principle using the command bellow.
az ad sp create-for-rbac --name "temp-github-action-svp" --role owner --scopes /subscriptions/${SUBSCRIPTION_ID} --sdk-auth
Ignore the warning: Option '--sdk-auth' has been deprecated and will be removed in a future release.
- Copy and paste the output after creating service principle in the format bellow in your clip board.
{
"clientId": "",
"clientSecret": "",
"subscriptionId": "",
"tenantId": "",
"activeDirectoryEndpointUrl": "",
"resourceManagerEndpointUrl": "",
"activeDirectoryGraphResourceId": "",
"sqlManagementEndpointUrl": "",
"galleryEndpointUrl": "",
"managementEndpointUrl": ""
}
Save service principle credentials in github secrets
- Open github and create a new repository with any name of your choice
- Open the repository and click on settings.
- Scroll down and click on secrets and select actions.
- Click on
new repository secrets
. - Copy and past the output of creation of the service princlicple in the bellow form
{
"clientId": "",
"clientSecret": "",
"subscriptionId": "",
"tenantId": "",
"activeDirectoryEndpointUrl": "",
"resourceManagerEndpointUrl": "",
"activeDirectoryGraphResourceId": "",
"sqlManagementEndpointUrl": "",
"galleryEndpointUrl": "",
"managementEndpointUrl": ""
}
- Click on save
Test Pipeline
- push the code to your repository.
- Navigate to
Actions
and see your pipeline being triggered by github actions. - Wait for the deployment to complete and test your endpoint.
Note: The endpoint can be tested using the url generated by the container app with /docs append to it. Example: https://stroke0modelm.victoriousstone-80e7c8c7.centralus.azurecontainerapps.io/docs