Commands model:power_iteration_clustering/predict¶
Predict the clusters to which the nodes belong to
POST /v1/commands/¶
GET /v1/commands/:id¶
Request¶
Route
POST /v1/commands/
Body
name: | model:power_iteration_clustering/predict |
---|---|
arguments: | model : Model
frame : Frame
source_column : unicode
destination_column : unicode
similarity_column : unicode
k : int32 (default=2)
max_iterations : int32 (default=100)
initialization_mode : unicode (default=random)
|
Headers
Authorization: test_api_key_1
Content-type: application/json
Description
Predict the cluster assignments for the nodes of the graph and create a new frame with a column storing node id and a column with corresponding cluster assignment
Response¶
Status
200 OK
Body
Returns information about the command. See the Response Body for Get Command here below. It is the same.
GET /v1/commands/:id¶
Request¶
Route
GET /v1/commands/18
Body
(None)
Headers
Authorization: test_api_key_1
Content-type: application/json
Response¶
Status
200 OK
Body
dict
Dictionary containing clustering results | predicted_frame : Frame | A new frame with a column ‘id’ with the node id, and a column ‘cluster’ with the node’s cluster assignment | number_of_clusters : int | Quantity of clusters used | cluster_size : dict | Cluster populations, keyed by names ‘Cluster:1’ through ‘Cluster:n’