XGboost model template¶
Download link for necessary files: XGBoost files.
In this example we will show you the following:
How to create a deployment that uses a built XGboost model to make predictions on the price of houses based on criteria from the House Sales in King County, USA Dataset.
The resulting deployment is made up of the following:
|Function||A deployment that uses a trained XGboost model to predict house prices based on house criteria|
|Input field:||name: data, data_type: File|
|Output field:||name: prediciton, data_type: File|
How does it work?¶
Step 1: Login to your UbiOps account at https://app.ubiops.com/ and create an API token with project editor rights. To do so, click on Permissions in the navigation panel, and then click on API tokens. Click on [+]Add token to create a new token.
Give your new token a name, save the token in safe place and assign the following role to the token: project editor. This role can be assigned on project level.
Step 2: Download the xgboost-tutorial folder and open
xgboost_template.ipynb. In the notebook you will find a space to enter your API token and the name of your project in UbiOps. Paste the saved API token in the notebook in the indicated spot and enter the name of the project in your UbiOps environment. This project name can be found in the top of your screen in the WebApp. In the image in step 1 the project name is example.
Step 3: Run the Jupyter notebook
xgboost_template.ipynb and everything will be automatically deployed to your UbiOps environment! Afterwards you can explore the code in the notebook or explore the application in the WebApp. You can use this file if you want to make a request to your newly build deployment.