sub_result | R Documentation |
This function extracts a row-wise subset of a classification or regression result object.
sub_result(x, indices)
x |
The input result object, which should be an instance of a classification or regression result class. |
indices |
A vector of row indices to extract from the result object. |
A new result object containing only the specified row indices from the input result object.
Other sub_result:
sub_result.binary_classification_result()
,
sub_result.multiway_classification_result()
# Create a simple classification result object
observed <- c(1, 0, 1, 1, 0)
predicted <- c(1, 0, 0, 1, 1)
result <- list(observed = observed, predicted = predicted)
class(result) <- c("classification_result", "list")
# Extract a subset of the result object
sub_result(result, c(2, 3, 4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.