我有一個很大的輸入向量。目前,它一直堅持運行calibrated_clf.fit(x_train, y_train)
幾個小時。我不知道該計劃是死的還是什麼。如何在calibrated_clf.fit(x_train, y_train)
函數調用中打印某種進度?Python RandomForest sk-learn:停留了幾個小時,發生了什麼?
clf = ensemble.RandomForestClassifier(criterion = 'entropy', n_estimators = 350, max_features = 200,n_jobs=-1)
calibrated_clf = CalibratedClassifierCV(clf, method='isotonic')
print "Here 1"
calibrated_clf.fit(x_train, y_train)
print "Here 2"
x_train是大小爲(51733,250)的向量。 我在打印輸出上的「Here 1」上打了幾個小時。
n_estimators = 350是一個相當大的數字。首先嚐試10,20,並檢查它是否仍然需要那麼多時間 –
@VivekKumar:不,它根本不大。您甚至可以使用數千個估計器,而不會有任何問題。這主要取決於你修復的'max_depth'。 – MMF