def plot_example(alg, cec, fnum=1, D=10, nFES=50000, nGEN=5000, seed=[None], optType=OptimizationType.MINIMIZATION, optFunc=MinMB, wout=False, sr=[-100, 100], **kwu): func = getCecBench(cec, D) task = TaskConvPlot(D=D, nFES=nFES, nGEN=nGEN, optType=optType, benchmark=optFunc(func, sr[0], sr[1], fnum)) algo = alg(seed=seed[0], task=task) best = algo.run() logger.info('%s %s' % (best[0], best[1])) input('Press [enter] to continue')
def plot_example(alg, D=10, nFES=50000, nGEN=100000, seed=None, optType=OptimizationType.MINIMIZATION, optFunc=MinMB, **kn): task = TaskConvPlot(D=D, nFES=nFES, nGEN=nGEN, optType=optType, benchmark=optFunc()) algo = alg(seed=seed, task=task) best = algo.run() logger.info('%s %s' % (best[0], best[1])) input('Press [enter] to continue')