Explanations generation
In this section, we share endpoints used to generate explanations. A model and an input sample are required.
Last updated
In this section, we share endpoints used to generate explanations. A model and an input sample are required.
Last updated
GET
https://api.expai.io/api/explain/get_allowed
EXPAI implements several types of explanations. This endpoint returns all available techniques including a summary and preview.
Name | Type | Description |
---|---|---|
POST
https://api.expai.io/api/explain/<model_id>/graphics
Generate a Model Explanation. You can filter your data to provide insights based on meaningful subsets. Returns a Plotly JSON object and the raw values for the explanation.
POST
https://api.expai.io/api/explain/<model_id>/variable/graphics
Generate a Variable Explanation. You can filter your data to provide insights based on meaningful subsets. Returns a Plotly JSON object and the raw values for the explanation.
POST
https://api.expai.io/api/explain/<model_id>/sample/graphics
Generate a Prediction Explanation. You can filter your data to provide insights based on meaningful subsets. Returns a Plotly JSON object and the raw values for the explanation.
POST
https://api.expai.io/api/explain/<model_id>/what_if
Generate a WHAT IF Explanation. You can filter your data to provide insights based on meaningful subsets. Returns a Plotly JSON object and the raw values for the explanation.
POST
https://api.expai.io/api/explain/<model_id>/variable/graphics
Generate a WHAT IF BATTLE Explanation. You can filter your data to provide insights based on meaningful subsets. Returns a Plotly JSON object and the raw values for the explanation.
POST
https://api.expai.io/api/projects/<project_id>/explanation/create
Store an explanation within a project. Body parameters should contain those used to generate the explanation.
DELETE
https://api.expai.io/api/projects/<project_id>/explanation/<explanation_id>
Delete a Model in a Project
GET
https://api.expai.io/api/projects/<project_id>/explanation/list
List all explanations stored within a project
GET
https://api.expai.io/api/projects/<project_id>/explanation/list/contains/<text>
List all explanations containing a given text in their titles.
GET
https://api.expai.io/api/projects/<project_id>/explanation/list/last/<N>
List last N explanations stored within a project
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
access-token
string
Active JWT token
Content-Type
string
Value: "application/json"
model_id
string
Unique ID from the model you want to explain
access-token
string
Active JWT token
sample_id
string
ID from the input sample to explaining the model.
subset_indexes
array
List of row indexes used for explanation
subset_filters
string
Dictionary containing filtering rules for the dataframe.
target_class
string
If you are explaining a categorical model, choose the class for which you want to obtain insights.
model_id
string
Unique ID from the model you want to explain
access-token
string
Active JWT token
variables
array
Array of variables that should be explained.
variables_type
string
Dictionary containing the type for each variable that is going to be explained. Variable names as keys and 'numerical'/'categorical' as values.
sample_id
string
ID from the input sample to explaining the model.
subset_indexes
array
List of row indexes used for explanation
subset_filters
string
Dictionary containing filtering rules for the dataframe.
target_class
string
If you are explaining a categorical model, choose the class for which you want to obtain insights.
model_id
string
Unique ID from the model you want to explain
access-token
string
Active JWT token
index
string
Unique index for the prediction that should be explained.
sample_id
string
ID from the input sample to explaining the model.
subset_indexes
array
List of row indexes used for explanation
subset_filters
string
Dictionary containing filtering rules for the dataframe.
target_class
string
If you are explaining a categorical model, choose the class for which you want to obtain insights.
model_id
string
Unique ID from the model you want to explain
access-token
string
Active JWT token
variables
array
Variables on which potential values should be explored.
variables_type
string
Dictionary containing the type for each variable that is going to be explored. Variable names as keys and 'numerical'/'categorical' as values.
index
string
Index for the prediction on which WHAT IF will be executed.
sample_id
string
ID from the input sample to explaining the model.
subset_indexes
array
List of row indexes used for explanation
subset_filters
string
Dictionary containing filtering rules for the dataframe.
target_class
string
If you are explaining a categorical model, choose the class for which you want to obtain insights.
model_id
string
Unique ID from the model you want to explain
access-token
string
Active JWT token
index
string
Unique index for the prediction that should be modified
replace_dict
string
Dictionary containing the replacements done to the original input to the model: {variable1: new_value, ...}
sample_id
string
ID from the input sample to explaining the model.
subset_indexes
array
List of row indexes used for explanation
subset_filters
string
Dictionary containing filtering rules for the dataframe.
target_class
string
If you are explaining a categorical model, choose the class for which you want to obtain insights.
variables
array
Variables on which some changes are set
project_id
string
Unique ID from the project in which you want to store your explanation
access-token
string
Active JWT token
model_id
string
Unique ID for the model that was explained.
explanation_json
string
Plotly JSON representing the explanation.
explanation_name_des
string
Title for the explanation
explanation_summary_des
string
Description for the explanation.
explanation_type_id
string
Identifier for the generated explanation. See table below.
variables_type
string
Dictionary containing variables types
variables
array
Array of variables to be explained
index
string
Unique index for the prediction that should be modified
replace_dict
string
Dictionary containing the replacements done to the original input to the model: {variable1: new_value, ...}
sample_id
string
ID from the input sample to explaining the model.
subset_indexes
array
List of row indexes used for explanation
subset_filters
string
Dictionary containing filtering rules for the dataframe.
target_class
string
If you are explaining a categorical model, choose the class for which you want to obtain insights.
project_id
string
Unique ID for the project containing the sample
explanation_id
string
Unique ID for the explanation to be deleted
access-token
string
Active JWT token
project_id
string
Unique ID from the project you want to retrieve explanations
access-token
string
Active JWT token
text
string
Substring to be searched in explanations titles
project_id
string
Unique ID from the project you want to retrieve explanations
access-token
string
Active JWT token
N
number
Number of explanations to be retrieved
project_id
string
Unique ID from the project you want to retrieve explanations
access-token
string
Active JWT token