K Most Frequent#

This Strategy outputs one of k most frequently occurring classes at random with equal probability.

Data Type: Categorical


# Param Default Type Description
1 k 1 int The number of most frequent classes to consider.

Additional Methods#

Return the k most frequent classes:

public classes() : array


use Rubix\ML\Other\Strategies\KMostFrequent;

$strategy = new KMostFrequent(5);