rcognita.optimizers.BruteForceOptimizer

class rcognita.optimizers.BruteForceOptimizer(possible_variants, N_parallel_processes=0)

Optimizer that searches for the optimal solution by evaluating all possible variants in parallel.”

__init__(possible_variants, N_parallel_processes=0)

Initialize an instance of BruteForceOptimizer.

Parameters
  • N_parallel_processes (int) – number of processes to use in parallel

  • possible_variants (list) – list of possible variants to evaluate

Methods

__init__(possible_variants[, …])

Initialize an instance of BruteForceOptimizer.

element_wise_maximization(x)

Find the variant that maximizes the reward for a given element.

optimize(objective, weights)

Maximize the objective function over the possible variants.

verbose(opt_func)

A static method decorator that makes the decorated function verbose.

Attributes

engine