Strategies#

Guesses can be thought of as a type of weak prediction. Unlike a real prediction, guesses are made using limited information. A guessing Strategy attempts to use such information to formulate an educated guess. Guessing is utilized in both Dummy Estimators (Dummy Classifier, Dummy Regressor) as well as the Missing Data Imputer.

Fit a Strategy#

To fit a Strategy to an array of values:

public fit(array $values) : void

Example

$strategy->fit($values);

Make a Guess#

To make a guess based on the fitted data:

public guess() : mixed

Example

var_dump($strategy->guess());

Output

string(3) "cat"