This documentation is for Machine Learner 1.0.0. View documentation for the latest release.
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Current »

Overview

DescriptionRetrieve cluster points of a dataset for a feature list.
Resource Path/api/datasets/{dataset_id}/cluster/?features={feature_list}&noOfClusters={number_of_clusters}
HTTP MethodGET
Request/Response Formatapplication/json

Parameter description

Parameter
Description
{dataset_id}ID of the dataset which you need to retrieve cluster points.
{feature_list}Feature list of the dataset.
{number_of_clusters}Number of clusters of the output.

Sample cURL command

curl -H -i "Content-Type: application/json" -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic YWRtaW46YWRtaW4=" -v "https://localhost:9443/api/datasets/8/cluster/?features=Age&noOfClusters=2" -k -v

Example

/api/datasets/{dataset_id}/cluster/?features=Age&noOfClusters=3 
  • features and noOfClusters cannot be empty.
  • noOfClusters should be greater than zero.

Sample output

[
{"features":[50.0],"cluster":1},
{"features":[31.0],"cluster":0},
{"features":[32.0],"cluster":0},
{"features":[21.0],"cluster":0},
{"features":[33.0],"cluster":0},
{"features":[30.0],"cluster":0},
{"features":[26.0],"cluster":0},
{"features":[29.0],"cluster":0},
{"features":[53.0],"cluster":1},
{"features":[54.0],"cluster":1}
]

REST API response

HTTP status code

200

For descriptions of the HTTP status codes, see HTTP Status Codes.

  • No labels