Skip to content

Commit

Permalink
Adding the documentation for XGBoost
Browse files Browse the repository at this point in the history
  • Loading branch information
Jineet Desai committed Oct 12, 2023
1 parent 6825ac1 commit e713c78
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/source/reference/ai/model-train-xgboost.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.. _xgboost:

Model Training with XGBoost
============================

1. Installation
---------------

To use the `Flaml XGBoost AutoML framework <https://microsoft.github.io/FLAML/docs/Examples/AutoML-for-XGBoost/>`_, we need to install the extra Flaml dependency in your EvaDB virtual environment.

.. code-block:: bash
pip install "flaml[automl] matplotlib openml"
2. Example Query
----------------

.. code-block:: sql
CREATE FUNCTION IF NOT EXISTS PredictRent FROM
( SELECT number_of_rooms, number_of_bathrooms, days_on_market, rental_price FROM HomeRentals )
TYPE XGBoost
PREDICT 'rental_price';
In the above query, you are creating a new customized function by training a model from the ``HomeRentals`` table using the ``Flaml XGBoost`` framework.
The ``rental_price`` column will be the target column for predication, while the rest columns from the ``SELET`` query are the inputs.

0 comments on commit e713c78

Please sign in to comment.