SymetryML Documentation
Data drift

Analyze data drift between two projects

The request body is an `MLContext` whose `extraParameters` map carries: - **`drift_pref_project_name`** (required): the reference/baseline project. - **`drift_analysis_project_name`** (required): the project being analyzed for drift. May also be the literal value `rollingWindowEmbeddedProject`, to use the reference project's embedded rolling-window project. - **`drift_metric`** (optional, default `mahalanobis`): one of `mahalanobis`, `marginal_stat`, `marginal_non_stat`, or `pca_reconstruction_error`. - **`drift_confidence`** (optional, default `0.95`): applies to the `mahalanobis` and `marginal_stat` metrics. - Advanced `mahalanobis`-only tuning parameters, all optional: `drift_regularize`, `drift_force_spd`, `drift_filter_for_rank`, `drift_do_pca`, `drift_pca_explained_var`, `drift_sensitivity`, and `drift_do_frobenius`. `inputAttributeNames` is required (only the first name is used) when `drift_metric` is `marginal_stat` or `marginal_non_stat`. It is optional for `mahalanobis` and `pca_reconstruction_error`, where all attributes are used when omitted. The response's `KSVDMap` keys are metric-specific: each `drift_metric` returns a different set of score names, as shown in the examples below.

POST
/{user}/projects/dataDrift

The request body is an MLContext whose extraParameters map carries:

  • drift_pref_project_name (required): the reference/baseline project.
  • drift_analysis_project_name (required): the project being analyzed for drift. May also be the literal value rollingWindowEmbeddedProject, to use the reference project's embedded rolling-window project.
  • drift_metric (optional, default mahalanobis): one of mahalanobis, marginal_stat, marginal_non_stat, or pca_reconstruction_error.
  • drift_confidence (optional, default 0.95): applies to the mahalanobis and marginal_stat metrics.
  • Advanced mahalanobis-only tuning parameters, all optional: drift_regularize, drift_force_spd, drift_filter_for_rank, drift_do_pca, drift_pca_explained_var, drift_sensitivity, and drift_do_frobenius.

inputAttributeNames is required (only the first name is used) when drift_metric is marginal_stat or marginal_non_stat. It is optional for mahalanobis and pca_reconstruction_error, where all attributes are used when omitted.

The response's KSVDMap keys are metric-specific: each drift_metric returns a different set of score names, as shown in the examples below.

Authorization

SymetryMLAuth
AuthorizationBearer <token>

HMAC-SHA256 signature-based authentication: requests are signed with your secret key and sent with the Customer-ID, Sym-date, Authorization, Content-MD5 and sym-version headers. See SymetryML REST API Security for the signature algorithm and a complete example.

In: header

Path Parameters

user*string

User/Customer identifier

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/c1/projects/dataDrift" \  -H "Content-Type: application/json" \  -d '{    "inputAttributeNames": [      "Elevation",      "Aspect",      "Slope",      "Horizontal_Distance_To_Roadways"    ],    "extraParameters": {      "drift_pref_project_name": "test_drift_reference",      "drift_analysis_project_name": "test_drift_analysis",      "drift_metric": "mahalanobis",      "drift_regularize": "false",      "drift_confidence": "0.95",      "drift_force_spd": "false",      "drift_filter_for_rank": "false",      "drift_do_pca": "true",      "drift_pca_explained_var": "0.95",      "drift_sensitivity": "strict",      "drift_do_frobenius": "true"    }  }'

{  "statusCode": 200,  "statusString": "OK",  "values": {    "KSVDMap": {      "values": [        {          "equal_cov_f2": 1.0862525778127035,          "equal_cov_f2_std": 0.000011685739380477538,          "equal_cov_critical_value": 1.561615736369221,          "equal_is_drift": 0,          "equal_threshold_std": 0.1,          "unequal_cov_f2": 1.0983680365255712,          "unequal_cov_f2_std": 0.00001181806230396324,          "unequal_cov_critical_value": 1.561697284224015,          "unequal_is_drift": 0,          "unequal_threshold_std": 0.1,          "drift_confidence_used": 0.99,          "drift_covariance_is_unequal_fro": 1,          "drift_effective_size_hotelling": 1        }      ]    }  }}

{  "statusCode": 500,  "statusString": "Generic Exception [java.lang.IllegalArgumentException: Invalid case: not_a_real_metric is not supported]",  "values": {}}