Get Feature Importance for an Analysis Group
Get Feature Importance data for an Analysis Group.
This endpoint provides Feature Importance results aggregated across the Analyses in an existing Analysis Group, and returns a list of feature groups with associated Features API features and group p-values.
Get Feature Importance data for an Analysis Group.
Enter your PredictHQ API key. The Bearer prefix is added automatically.
When calling the API directly, send: 'Authorization: Bearer <YOUR_API_KEY>' as documented at https://docs.predicthq.com/api/overview/authenticating
An Analysis Group ID. Analyses that belong to this group will be returned.
3ED1zxXqAYSuccessful Response
Feature importance data is not ready or not found
Bearer token scope insufficient
Analysis Group not found
Validation Error
GET /v1/beam/analysis-groups/{group_id}/feature-importance HTTP/1.1
Host: api.predicthq.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"feature_importance": [
{
"feature_group": [
"severe-weather",
"concerts"
],
"features": [
"phq_attendance_concerts"
],
"p_value": 0.312,
"important": true
}
]
}Examples
curl -X GET "https://api.predicthq.com/v1/beam/analysis-groups/$GROUP_ID/feature-importance" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"import requests
response = requests.get(
url="https://api.predicthq.com/v1/beam/analysis-groups/$GROUP_ID/feature-importance",
headers={
"Authorization": "Bearer $ACCESS_TOKEN",
"Accept": "application/json"
}
)
print(response.json())OpenAPI Spec
The OpenAPI spec for Beam API can be found here.
Last updated
Was this helpful?