Skip to content

Getting Started

Learn more by visiting our website: https://explainx.ai

Installation

The recommended way of installing explainX is by using pip – the Python package manager.

explainX python library can be installed with pip:

pip install explainx

Note that this will automatically install all dependencies and requirements required. ExplainX always strives to support the latest versions, so there's no need to install any packages separately.

Installation in a virtual environment

The best way to make sure that you end up with the correct versions and without any incompatibility problems between packages it to use a virtual environment. Don't know what this is or how to set it up? We recommend to start by reading a tutorial on virtual environments for Python.

Installation on macOS

When you're running the pre-installed version of Python on macOS, pip tries to install packages in a folder for which your user might not have the adequate permissions. There are two possible solutions for this:

  1. Installing in user space (recommended): Provide the --user flag to the install command and pip will install the package in a user-site location. This is the recommended way.

  2. Switching to a homebrewed Python: Upgrade your Python installation to a self-contained solution by installing Python with Homebrew. This should eliminate a lot of problems you could be having with pip.

Import Library

The recommended way of installing explainX is by using pip – the Python package manager.

explainX python library can be installed with pip:

from explainx import *

Main Function

explainx.ai(X_Data, Y_Data, model, model_name, mode)
The main function requries 4 main arguments and 1 display argument.

X_Data: Pandas DataFrame containing the dataset without the y_variable/predicting variable. The data set needs to be a CSV file.

Y_Data: Pandas Series containing the y_variable/predicting variable data only.

model: This is your model training function. It can be Model.train or Model.fit (Training Function)

model_name: Name of your model. We support multiple models and you can print out a list of supported model names by calling the explainx.models() function e.g. 'xgboost', 'catboost'

mode: By default the application with provide you a link that opens up in a new tab. If you want to use the interface within the jupyter notebook, add mode="inline"

Run Dashboard

After the function has successfully run, you will get a link to the dashboard. Click on that link to open the dashboard.

Your app is running at https://127.0.0.1:8002