202109261813 Randomness in Scikit-learn

#machine learning #scikit-learn #pitfalls #programming

Randomness in Scikit-learn

Use RandomState to make sure your code

  • is reproducible between runs
  • maintains randomness within the pipeline

Avoid setting the global random seed – it can fix all the randomness for any code subsequently involved, including caller code.