Skip to main content

Break ties

When your dataset has multiple points with the exact same value, it can cause problems with data transformation. Breaking ties, sometimes called despiking, is a way to avoid that. When you break ties, you add tiny random numbers to all the data values. This task adds a random number between 10^-7 and 10^-6 to each data value. The random number is different for each one.

Parameters

Example

Request

requests.post(
"https://{hub}.api.seequent.com/compute/orgs/{org_id}/geostat/break-ties",
headers={"Authorization": "Bearer {token}"},
json={
"parameters": {
"composites": {
"type": "geoscience-object-reference",
"object_reference": "https://{hub}.api.seequent.com/geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/path/my-pointset.json",
"object_element": [
{
"type": "element",
"path": "/locations/attributes/@name=my-data",
},
],
},
"target": {
"type": "geoscience-object-reference",
"object_reference": "https://{hub}.api.seequent.com/geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/path/my-pointset.json",
"object_element": [
{
"type": "element",
"path": "/locations/attributes/@name=my-data-without-ties",
},
],
},
"random_seed": 9,
},
},
)

Result

{
"message": "Breaking ties completed.",
"object_modified": {
"type": "geoscience-object-reference",
"object_reference": "https://{hub}.api.seequent.com/geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/path/my-pointset.json",
"object_element": [
{
"type": "element",
"path": "/locations/attributes/@name=my-data-without-ties",
},
],
},
}

Tips

  • The composites and target can use the same object, but they don't have to.