我有一个必须使用大量参数类型运行的函数
# generic function with named parameters
def genericFn(X, y, a_fn ='t', o_fn ='a', l_fn='b', dim=2):
...
return accuracy
我有一个参数类型列表
a_fns = ['t', 's', 'r', 'l']
o_fns = ['s', 'a']
l_fns = ['m', 'h', 'l', 'b', 'k', 'p']
如何将所有可能的功能组合传递给池
with concurrent.futures.ProcessPoolExecutor() as executor:
results_list = executor.map(genericFn, (combinations of named parameters))