Skip to contents

This function calculates the predicted class from a matrix of predicted probabilities. The class with the highest probability is selected as the predicted class.

Usage

predicted_class(prob)

Arguments

prob

A matrix of predicted probabilities with column names indicating the classes.

Value

A vector of predicted classes corresponding to the highest probability for each row in the input matrix.