Prediction model for Mobi.lo apps by Mari Bangkit. Hosted in Azure ML as a web service.
The exported model uses Lasso Regression to predict the car purchase amount a customer would buy based on their profile, such as gender, annual salary, and more. The main aim is to provide a personalized car recommendation for customers.
The dataset used is accessible here. It is originally come from Car Purchase Price (beginner dataset), but has been modified to suit the Indonesian currency (Rp).
Research paper: https://ejurnal.stmik-budidarma.ac.id/index.php/jurikom/article/view/5021
-
Azure Machine Learning workspace resource.
-
Azure CLI and the
ml
extension. Each on v2 or more. -
Python v3 or more.
-
Bash/Fish/ZSH or any UNIX-like shell.
-
Clone the repo.
git clone https://github.com/mari-bangkit/prediction-model.git cd prediction-model
-
Log in to Azure account and set up Azure CLI default setting.
az login az account set --subscription <subscription ID> az configure --defaults group=<resource group> workspace=<Azure Machine Learning workspace name>
-
Run local deployment script.
./deploy_local.sh
The endpoint URL is provided at the FINAL STATUS section.
-
Test the API.
Bash/ZSH shell:
export AZURE_ML_URL_LOCAL=<local endpoint url> python test_request_local.py
Fish shell:
set -x AZURE_ML_URL_LOCAL <local endpoint url> python test_request_local.py
-
Run Azure deployment script.
./deploy_azure.sh
Open your workspace in Azure ML Studio to get the API URL and key.
-
Test the API.
Bash/ZSH shell:
export AZURE_ML_URL=<endpoint url> export AZURE_ML_API_KEY=<endpoint key> python test_request_cloud.py
Fish shell:
set -x AZURE_ML_URL <endpoint url> set -x AZURE_ML_API_KEY <endpoint key> python test_request_cloud.py