This version never ends because this line:
classifier = OneVsRestClassifier(svm.SVC(kernel='linear', probability=True, random_state=random_state))
The svm classifier takes a very long time to use another classifier, for example AdaBoost or another one of your choice:
classifier = OneVsRestClassifier(AdaBoostClassifier())
Do not forget to add import:
from sklearn.ensemble import AdaBoostClassifier
Remove this code, it is useless:
Instead, just add:
random_state = 0
source share