Commands frame/column_mode¶
Evaluate the weights assigned to rows.
POST /v1/commands/¶
GET /v1/commands/:id¶
Request¶
Route
POST /v1/commands/
Body
name: | frame/column_mode |
---|---|
arguments: | frame : Frame
data_column : unicode
weights_column : unicode (default=None)
max_modes_returned : int32 (default=None)
|
Headers
Authorization: test_api_key_1
Content-type: application/json
Description
Calculate the modes of a column. A mode is a data element of maximum weight. All data elements of weight less than or equal to 0 are excluded from the calculation, as are all data elements whose weight is NaN or infinite. If there are no data elements of finite weight greater than 0, no mode is returned.
Because data distributions often have multiple modes, it is possible for a set of modes to be returned. By default, only one is returned, but by setting the optional parameter max_modes_returned, a larger number of modes can be returned.
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 summary statistics.
- The data returned is composed of multiple components:
- mode : A mode is a data element of maximum net weight.
- A set of modes is returned. The empty set is returned when the sum of the weights is 0. If the number of modes is less than or equal to the parameter max_modes_returned, then all modes of the data are returned. If the number of modes is greater than the max_modes_returned parameter, only the first max_modes_returned many modes (per a canonical ordering) are returned.
- weight_of_mode : Weight of a mode.
- If there are no data elements of finite weight greater than 0, the weight of the mode is 0. If no weights column is given, this is the number of appearances of each mode.
- total_weight : Sum of all weights in the weight column.
- This is the row count if no weights are given. If no weights column is given, this is the number of rows in the table with non-zero weight.
- mode_count : The number of distinct modes in the data.
- In the case that the data is very multimodal, this number may exceed max_modes_returned.