1

I want to to do nested parallelism with scikit learn logisticregressionCV inside a for loop:

for i in range(0,10):
    logisticregressionCV(n_jobs=-1)

I want to parallelize the for loop as well.

I read a lot of post but I couldn't understand much. one of the post is this and this.

NOTE: This 'for' loop is not for cross-validation. 'i' can be thought of another dataset obtained from another set of commands not mentioned here i.e i have 10 different datasets and i compute logistic regression for each dataset parallelly.

Please help! have been stuck on this problem for the past 2 days!

1 Answer 1

1
  • First of all it's not clear why do you need this loop at all. Instead of having this loop just pass the cv=10 parameter.

  • Using parameter n_jobs=-1 already takes care of running this job in parallel on all available CPU cores.

Sign up to request clarification or add additional context in comments.

2 Comments

hi, this 'for' loop is not for cross-validation, you can think 'i' as another set of data obtained from another set of commands(not mentioned here),i.e there are 10 set of data and I pick one dataset and use logistic regression on it(which itself is parallelised ). I want to parallelise this for loop so that logistic regression is computed for all 10 datasets simultaneously and NOT SEQUENTIALLY.
@Aakashsaboo, can you elaborate? What are you trying to do? Why and how are are you going to use LogisticRegressionCV for different pieces of data? What would it bring you? And how are you going to merge results?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.