Skip to content

Commit 2d1042c

Browse files
authored
Update README.md
1 parent cef0eee commit 2d1042c

File tree

1 file changed

+96
-3
lines changed

1 file changed

+96
-3
lines changed

README.md

Lines changed: 96 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ Essential for:
3030
3. How can I understand and trust the model's decisions?
3131
4. Does my model satisfy legal & regulatory requirements?
3232

33-
Visit our website to learn more: https://www.explainx.ai
3433

3534
# Get Started
3635

@@ -55,60 +54,149 @@ After successfully installing explainX, open up your Python IDE of Jupyter Noteb
5554
1. Import required module.
5655

5756
```python
57+
5858
from explainx import *
5959
from sklearn.ensemble import RandomForestClassifier
6060
from sklearn.model_selection import train_test_split
61+
6162
```
6263

6364
2. Load and split your dataset into x_data and y_data
6465

6566
```python
67+
6668
#Load Dataset: X_Data, Y_Data
6769
#X_Data = Pandas DataFrame
6870
#Y_Data = Numpy Array or List
6971

7072
X_data,Y_data = explainx.dataset_heloc()
73+
7174
```
7275

7376
3. Split dataset into training & testing.
7477

7578
``` python
79+
7680
X_train, X_test, Y_train, Y_test = train_test_split(X_data,Y_data, test_size=0.3, random_state=0)
81+
7782
```
7883

7984
4. Train your model.
8085

8186
```python
87+
8288
# Train a RandomForest Model
8389
model = RandomForestClassifier()
8490
model.fit(X_train, Y_train)
91+
8592
```
8693

87-
5. Pass your model and dataset into the explainX function:
94+
After you're done training the model, you can either access the complete explainability dashboard or access individual techniques.
95+
96+
97+
## Complete Explainability Dashboard
98+
99+
To access the entire dashboard with all the explainability techniques under one roof, follow the code down below. It is great for sharing your work with your peers and managers in an interactive and easy to understand way.
100+
101+
5.1. Pass your model and dataset into the explainX function:
88102

89103
```python
90104
explainx.ai(X_test, Y_test, model, model_name="randomforest")
91105
```
92106

93-
6. Click on the dashboard link to start exploring model behavior:
107+
5.2. Click on the dashboard link to start exploring model behavior:
94108

95109
```python
110+
96111
App running on https://0.0.0.0:8080
112+
113+
```
114+
115+
116+
## Explainability Modules
117+
118+
In this latest release, we have also given the option to use explainability techniques individually. This will allow the user to choose technique that fits their personal AI use case.
119+
120+
6.1. Pass your model, X_Data and Y_Data into the explainx_modules function.
121+
122+
```python
123+
124+
explainx_modules.ai(X_test, Y_test, model")
125+
126+
```
127+
As an upgrade, we have eliminated the need to pass in the model name as explainX is smart enough to identify the model type and problem type i.e. classification or regression, by itself.
128+
129+
You can access multiple modules:
130+
131+
Module 1: Dataframe with Predictions
132+
```python
133+
134+
explainx_modules.dataframe_graphing()
135+
136+
```
137+
138+
Module 2: Model Metrics
139+
```python
140+
141+
explainx_modules.metrics()
142+
143+
```
144+
145+
Module 3: Global Level SHAP Values
146+
```python
147+
148+
explainx_modules.shap_df()
149+
150+
```
151+
152+
Module 4: What-If Scenario Analysis (Local Level Explanations)
153+
```python
154+
155+
explainx_modules.what_if_analysis()
156+
97157
```
98158

159+
Module 5: Partial Dependence Plot & Summary Plot
160+
```python
161+
162+
explainx_modules.feature_interactions()
163+
164+
```
165+
166+
Module 6: Model Performance Comparison (Cohort Analysis)
167+
```python
168+
169+
explainx_modules.cohort_analysis()
170+
171+
```
172+
173+
To access the modules within your jupyter notebook as IFrames, just pass the <b>mode='inline'</b> argument.
174+
175+
176+
<b>For detailed description into each module, check out our documentation at https://www.docs.explainx.ai</b>
177+
178+
179+
## Cloud Installation
180+
99181
**If you are running explainX on the cloud e.g., AWS Sagemaker?** **https://0.0.0.0:8080** will not work.
100182
Please visit our documentation for installation instructions for the cloud: [Cloud Installation Instructions](https://docs.explainx.ai/getting-started/installation)
101183

102184
After installation is complete, just open your **terminal** and run the following command.
103185
```jupyter
186+
104187
lt -h "https://serverless.social" -p [port number]
188+
105189
```
106190
```jupyter
191+
107192
lt -h "https://serverless.social" -p 8080
193+
108194
```
109195

110196
<img width="1000" src="demo-explainx-with-sound.gif" alt="explainX.ai">
111197

198+
199+
112200
## Walkthough Video Tutorial
113201

114202
Please click on the image below to load the tutorial:
@@ -117,6 +205,8 @@ Please click on the image below to load the tutorial:
117205

118206
(Note: Please manually set it to 720p or greater to have the text appear clearly)
119207

208+
209+
120210
## Supported Techniques
121211

122212
|Interpretability Technique | Status |
@@ -130,6 +220,8 @@ Please click on the image below to load the tutorial:
130220
|Anchors | Coming Soon |
131221
|Integrated Gradients (IG)| Coming Soon |
132222

223+
224+
133225
## Main Models Supported
134226

135227
| No. | Model Name | Status |
@@ -149,6 +241,7 @@ Please click on the image below to load the tutorial:
149241
|13.| PyTorch Models | Coming Soon |
150242

151243

244+
152245
## Contributing
153246
Pull requests are welcome. In order to make changes to explainx, the ideal approach is to fork the repository then clone the fork locally.
154247

0 commit comments

Comments
 (0)