Commands model:daal_k_means/train

[ALPHA] Creates DAAL KMeans Model from train frame.

POST /v1/commands/

GET /v1/commands/:id

Request

Route

POST /v1/commands/

Body

name:

model:daal_k_means/train

arguments:

model : Model

<Missing Description>

frame : Frame

A frame to train the model on.

observation_columns : list

Columns containing the observations.

column_scalings : list (default=None)

Optional column scalings for each of the observation columns. The scaling value is multiplied by the corresponding value in the observation column.

k : int32 (default=2)

Desired number of clusters. Default is 2.

max_iterations : int32 (default=100)

Number of iterations for which the algorithm should run. Default is 20.

label_column : unicode (default=predicted_cluster)

Optional name of output column with index of cluster each observation belongs to.


Headers

Authorization: test_api_key_1
Content-type: application/json

Description

Creating a DAAL KMeans Model using the observation columns. The algorithm chooses random observations as the initial cluster centers.


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
A dictionary with trained KMeans model with the following keys:

‘centroids’ : dictionary with ‘Cluster:id’ as the key and the corresponding centroid as the value ‘assignments’ : Frame with cluster assignments.