predicted_class: Calculate the Predicted Class from Probability Matrix

View source: R/performance.R

predicted_classR Documentation

Calculate the Predicted Class from Probability Matrix

Description

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.


bbuchsbaum/rMVPA documentation built on June 10, 2025, 8:23 p.m.