Skip to main content
POST
/
quantlib
/
ml
/
clustering
/
hierarchical
Hierarchical Clustering
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/ml/clustering/hierarchical \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "X": [
    [
      1.2,
      0.5
    ],
    [
      1.3,
      0.6
    ],
    [
      5.1,
      4.8
    ],
    [
      5.3,
      4.9
    ]
  ],
  "n_clusters": 2,
  "linkage": "ward"
}
'
{
  "success": true,
  "data": {
    "labels": [
      0,
      0,
      1,
      1
    ]
  }
}

Authorizations

X-API-Key
string
header
required

API key for authentication. Get your key at https://finceptbackend.share.zrok.io/auth/register

Body

application/json
X
number[][]
required

Feature matrix

Example:
[
[1.2, 0.5],
[1.3, 0.6],
[5.1, 4.8],
[5.3, 4.9]
]
n_clusters
integer
default:3

Number of clusters

Example:

2

linkage
enum<string>
default:ward

Linkage criterion

Available options:
ward,
single,
complete,
average
Example:

"ward"

Response

Hierarchical clustering results

success
boolean
Example:

true

data
object