Commands frame/classification_metrics¶
Model statistics of accuracy, precision, and others.
POST /v1/commands/¶
GET /v1/commands/:id¶
Request¶
Route
POST /v1/commands/
Body
name: | frame/classification_metrics |
---|---|
arguments: | frame : Frame
label_column : unicode
pred_column : unicode
pos_label : None (default=None)
beta : float64 (default=None)
frequency_column : unicode (default=None)
|
Headers
Authorization: test_api_key_1
Content-type: application/json
Description
Calculate the accuracy, precision, confusion_matrix, recall and measure for a classification model.
The f_measure result is the measure for a classification model. The measure of a binary classification model is the harmonic mean of precision and recall. If we let:
- beta ,
- denotes the number of true positives,
- denotes the number of false positives, and
- denotes the number of false negatives
then:
The measure for a multi-class classification model is computed as the weighted average of the measure for each label, where the weight is the number of instances of each label. The determination of binary vs. multi-class is automatically inferred from the data.
The recall result of a binary classification model is the proportion of positive instances that are correctly identified. If we let denote the number of true positives and denote the number of false negatives, then the model recall is given by .
For multi-class classification models, the recall measure is computed as the weighted average of the recall for each label, where the weight is the number of instances of each label. The determination of binary vs. multi-class is automatically inferred from the data.
The precision of a binary classification model is the proportion of predicted positive instances that are correctly identified. If we let denote the number of true positives and denote the number of false positives, then the model precision is given by: .
For multi-class classification models, the precision measure is computed as the weighted average of the precision for each label, where the weight is the number of instances of each label. The determination of binary vs. multi-class is automatically inferred from the data.
The accuracy of a classification model is the proportion of predictions that are correctly identified. If we let denote the number of true positives, denote the number of true negatives, and denote the total number of classified instances, then the model accuracy is given by: .
This measure applies to binary and multi-class classifiers.
The confusion_matrix result is a confusion matrix for a binary classifier model, formatted for human readability.
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
The data returned is composed of multiple components:
<object>.accuracy : double<object>.confusion_matrix : table<object>.f_measure : double<object>.precision : double<object>.recall : double