Retrieve a forecast's analysis
https://api.faraday.ai/v1/forecasts/{forecast_id}/analysisHow the forecast's current model performed on entries it did not train on, the level correction applied to delivered values, how the training labels were handled, and the readings taken on each daily refresh. Written by the forecast's refresh after a build finishes; until then the request returns 404.
Authentication
Provide your API key in the Authorization header. You can find your API key in the Settings page of the dashboard.
Authorization: Bearer YOUR_TOKENpath parameters
The UUID of a forecast
Responses
200The forecast's analysis
calibrationobjectThe level correction the latest refresh applies to delivered values. Absent when the refresh recorded none.
driftobjectThe drift reading of the latest refresh, on the newest cohort whose window is fully observed. Absent when the refresh recorded none.
generationobjectThe model build the analysis describes.
label_handlingobjectWhat was done to the matured values before the model learned from them.
performanceobjectPerformance of the current model on held-out entries.
refreshesarray[object]The newest daily refreshes of the current model, newest first, each with the level readings it recorded.
versionstringShort hash of the forecast's definition, the version delivered with each entry. It changes when a defining member changes, not on a routine retrain.
400The request was invalid.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICT, QUOTA_EXCEEDEDA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
401No API key was supplied.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICT, QUOTA_EXCEEDEDA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
403Access to this resource was forbidden.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICT, QUOTA_EXCEEDEDA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
404The requested resource ID was not found.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICT, QUOTA_EXCEEDEDA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
500An internal server error occurred.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICT, QUOTA_EXCEEDEDA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
Tags
Test request
Request snippet
curl -X GET 'https://api.faraday.ai/v1/forecasts/{forecast_id}/analysis' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY'Example response
{
"calibration": {
"applies_below_age": 0,
"base_entries": 0,
"base_mean_early": 0,
"factor": 1.04,
"method": "string",
"ran_at": "2024-01-01T12:00:00Z",
"reason": "string",
"recent_entered_before": "2024-01-01",
"recent_entered_from": "2024-01-01",
"recent_entries": 0,
"recent_mean_early": 0,
"refreshed_at": "2024-01-01T12:00:00Z",
"window_days": 0,
"yoy_factor": 0
},
"drift": {
"ratio": 0,
"reason": "string",
"recent_entered_before": "2024-01-01",
"recent_entered_from": "2024-01-01",
"recent_entries": 0,
"window_days": 0,
"by_window": [
{
"ratio": 0,
"reason": "string",
"recent_entered_before": "2024-01-01",
"recent_entered_from": "2024-01-01",
"recent_entries": 0,
"window_days": 0
}
],
"data": {
"high_water_mark": "2024-01-01T12:00:00Z",
"lag_days": 0,
"pinned": true
},
"development_share": 0,
"expected_realized_mean": 0,
"predicted_total_mean": 0,
"ran_at": "2024-01-01T12:00:00Z",
"realized_mean": 0,
"refreshed_at": "2024-01-01T12:00:00Z"
},
"generation": {
"active_entries": 0,
"balance": 0,
"boosting_rounds": 0,
"entries": 0,
"feature_columns": [
"string"
],
"finished_at": "2024-01-01T12:00:00Z",
"holdout_entries": 0,
"holdout_rows": 0,
"matured_entries": 0,
"trained_as_of": "2024-01-01T12:00:00Z",
"trained_entries": 0,
"trained_rows": 0,
"training_entries_from": "2024-01-01",
"training_entries_to": "2024-01-01",
"unmatched_value_event_share": 0,
"value_events": 0
},
"label_handling": {
"ages": [
0
],
"cap_quantile": 0.999,
"capped": 0,
"excluded_dates": 0,
"floored": 0,
"label_cap": 0,
"training_entries": 0,
"training_rows": 0
},
"performance": {
"acceptance": {
"passed": true,
"reasons": [
"string"
]
},
"by_age": [
{
"gini": 0.3,
"mae": 0,
"mean_actual": 0,
"mean_forecast": 0,
"n": 0,
"rmse": 0,
"top_decile_share": 0.25,
"total_bias": 0.04,
"age": 0,
"constant_baseline": {
"mae": 0,
"mean_forecast": 0,
"rmse": 0,
"total_bias": 0
},
"deciles": [
{
"decile": 0,
"mean_actual": 0,
"mean_forecast": 0,
"n": 0,
"share_of_actual": 0,
"total_bias": 0
}
],
"total_bias_interval": {
"high": 0,
"level": 0.9,
"low": 0
}
}
],
"by_prior_entries": [
{
"gini": 0.3,
"mae": 0,
"mean_actual": 0,
"mean_forecast": 0,
"n": 0,
"rmse": 0,
"top_decile_share": 0.25,
"total_bias": 0.04,
"prior_entries": "0"
}
],
"cold_start": {
"attributes_offered": 0,
"entries_from": "2024-01-01",
"model": {
"attributes": 0,
"balance": 0,
"boosting_rounds": 0,
"fit": {
"gini": 0.3,
"mae": 0,
"mean_actual": 0,
"mean_forecast": 0,
"n": 0,
"rmse": 0,
"top_decile_share": 0.25,
"total_bias": 0.04
},
"holdout": {
"gini": 0.3,
"mae": 0,
"mean_actual": 0,
"mean_forecast": 0,
"n": 0,
"rmse": 0,
"top_decile_share": 0.25,
"total_bias": 0.04
},
"holdout_rows": 0,
"matched_rows": 0,
"matched_share": 0,
"mean_attribute_fill": 0,
"rows": 0,
"trained_rows": 0
},
"prior": 0,
"prior_entries": 0,
"skipped": "string"
},
"newest_entries": {
"by_age": [
{
"gini": 0.3,
"mae": 0,
"mean_actual": 0,
"mean_forecast": 0,
"n": 0,
"rmse": 0,
"top_decile_share": 0.25,
"total_bias": 0.04,
"age": 0,
"constant_baseline": {
"mae": 0,
"mean_forecast": 0,
"rmse": 0,
"total_bias": 0
},
"deciles": [
{
"decile": 0,
"mean_actual": 0,
"mean_forecast": 0,
"n": 0,
"share_of_actual": 0,
"total_bias": 0
}
],
"total_bias_interval": {
"high": 0,
"level": 0.9,
"low": 0
}
}
],
"entered_from": "2024-01-01T12:00:00Z"
}
},
"refreshes": [
{
"calibration_factor": 0,
"drift_ratio": 0,
"entries": 0,
"ran_at": "2024-01-01T12:00:00Z",
"refreshed_at": "2024-01-01T12:00:00Z",
"unmatched_value_event_share": 0
}
],
"version": "string"
}