xgboost: Does Xgboost version 0.6 run slower than 0.4 in python?
I installed updated version of xgboost 0.6 in python 3.4 and version 0.4 in python 2.7, from the running performance for the same code , version 0.6 is much slower than 0.4, does anyone meet the same situation like me? Is it really the case that version 0.6 is slower than 0.4 or just something wrong with my installation?
Running result(version 0.6):
(1,199) (2,152) (3,100) (4,76)
Running result(version 0.4):
(1, 115) (2, 62) (3, 46) (4, 40)
The code I used to run as follow:
from pandas import read_csv
from xgboost import XGBClassifier
from sklearn.preprocessing import LabelEncoder
import time
data = read_csv('train.csv'), # Kaggel Otto competition, train.csv
dataset = data.values
X = dataset[:,0:94]
y = dataset[:,94]
label_encoded_y = LabelEncoder().fit_transform(y)
results = []
num_threads = [1, 2, 3, 4]
for n in num_threads:
start = time.time()
model = XGBClassifier(nthread=n)
model.fit(X, label_encoded_y)
elapsed = time.time() - start
print(n, elapsed)
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 27 (16 by maintainers)
kendu605, I find that compiling xgboost using the MingW64 compiler creates a dll that is about 50% faster than when I compile directly from ms visual studio. Could this be what you are seeing? Could your initial 0.4 build have been produced via a different compiler?
I tried different settings in visual studio such as:
Perhaps you could try points 1-4 see if this makes any difference for your machine? And also a MingW compile. I’d be very interested in your results.