Post

Usage 1. Start with an evaluation function def evaluate(*, a, b, c): return a * b**3 % c (The leading * tells Python that everything that follows is a required keyword argument) 2. Build a collection of values to try for each parameter values = {"a": [4, 7, 9], "b": [2, 5, 6], "c": [5, 8, 11]}

3. Call the optimizer from redsho.optimizer import optimize error, params = optimize(evaluate, values) where error is the lowest error achieved, and params is the parameter values that achieved it.

No replies yet.