Skip to content

Let's build an example on your Jupyter Notebook

To start in less than five mins, you can follow this working example line by line or simply copy-paste the code in your Jupyter Notebook.

For this example, we will use a simple dataset that is widely used for analysis purposes:

Boston Housing Dataset can be accessed from within the explainX library.

1. Install the library

!pip install explainx

2. Import the library

from explainx import *

3. Load Dataset

X_Data, Y_Data = explainx.dataset_boston()

4. Pass X_Data, Y_Data in your basic XGBoost Model

model = xgboost.train({"learning_rate": 0.01}, xgboost.DMatrix(X_Data, label=Y_Data), 100)

After the training is completed:

5. Pass your X_data, Y_data, y_variable name, model and model name to the explainx function, Y_Data, model, model_name="xgboost")
App running on

After you click on the link, you will get a dashboard. Let's continue and see how we can analyze our dashboard.