For 140K of NLP data, there will be huge number of features at hand.
So increasing the number of trees from 200 to 350 led to instance crash with n_jobs = 7 | parallel jobs in a 8 CPU-cores machine. I just want to know if it works like a Pool() and demands memory? If I decrease the cores to 3 or 5, will it be useful?
Any ways for preventing memory crash?
pipeline = Pipeline([
('tfidf', TfidfVectorizer(tokenizer = lambda x: x.split(' '), min_df = min_df, ngram_range = (1,rng))),
('clf',RandomForestClassifier(n_estimators = n_estimators, class_weight = class_weight, criterion = criterion, min_samples_split = min_samples_split,
max_features = max_features, oob_score = oob_score, warm_start = warm_start,
n_jobs = 7, random_state = SEED)),
])
del train, test
gc.collect()
pipeline.fit(train_x, train_y)
acc = accuracy_score(pipeline.predict(test_x), test_y)
print(acc, top_n(pipeline,test_x,test_y))
