When working in python for research I often end up with some problem where I want to compare a result over a different number of parameters.

params1 = [0.1, 0.2, 0.3]
params2 = [5, 10, 50]
parmas3 = range(8)

for (p1, p2, p3) in itertools.product(params1, params2, params3):
    result = evaluate(p1, p2, p3)

Is there some module or framework to manage a setup like this for many parameters, where I have a good way to

  • save the results
  • plot and analyse them conveniently
  • probably running multiple experiments in parallel
  • maybe even some caching and saving of intermediate results (e.g. if you want to continue the run later

I was thinking that this must be a pretty common pattern, but I was not able to find something that even slightly goes into this direction.

  • I think this is off topic for this particular site as it is a question about programming and not of finding an existing piece of software. You might consider Stack Overflow. – Eric S Jan 21 at 16:59
  • Did you read the question? – Christian Jan 21 at 17:08
  • Yes and the answer is that you are going to have to write a Python program to execute those tasks. This particular site is not about how to write Python programs. Just so you know, I am not the downvoter, but I'm guessing they think its off topic too. – Eric S Jan 21 at 17:10
  • Sorry, my last comment was slightly passive-aggressive. I edited my question and tried to make it more clear that I am in fact looking for a python module, which would be a piece of software. I pretty clearly know how I would do something like this myself, this is not what I am asking. But I was hoping to save some work, because I think it is a common problem and there must be some piece of software that does this already. So I came here. – Christian Jan 21 at 17:11
  • Could you please remove your downvote, because it does not help to find an answer? – Christian Jan 21 at 17:14

I'm not aware of a library that does everything you want (which doesn't mean it doesn't exist), and I suspect you will need to write code. That said, I do recommend you learn about the Pandas library. Pandas provides DataFrames which is a great way to organize such calculations. Once you have a DataFrames, things like data manipulation, IO and plotting are greatly eased. Pandas is very popular with data scientists.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.