[scikit-learn] XGboost Classifier error
Startup Hire
blrstartuphire at gmail.com
Tue Apr 18 07:56:52 EDT 2017
Hi!,
I am trying to use XGBoost Classifer in RandomizedSearchCV as follows:
clf = xgb.XGBClassifier()
random_search_sg = RandomizedSearchCV(clf, param_distributions=params_dist,
n_iter=n_iter_search,
scoring=kappa_scorer,
verbose=3,
error_score=-1,
fit_params=fit_params,
n_jobs=-1)
start = time()
random_search_sg.fit(scaled_data, a_l)
scaled_data = (0, 0) 4.53937223364
(0, 1) 4.08089927979
(0, 2) 5.08534158523
(0, 3) 0.900022077306
(0, 4) 0.582895703409
(0, 5) 3.52674131829
(0, 6) 2.00912587286
(0, 8) 1.06039501135
(0, 9) 4.8956331357
(0, 11) 1.51595206264
(0, 13) 3.00108387862
(0, 14) 0.0
(1, 0) 1.51312407788
(1, 1) 1.36029975993
(1, 2) 2.54267079261
(1, 3) 1.36638272336
(1, 4) 0.0225891281189
(1, 5) 3.52674131829
a_l = [1 0 0 ..., 0 0 0] (after using ravel)
I am getting the error
Python int too large to convert to C long
<http://stackoverflow.com/questions/22114088/overflowerror-python-int-too-large-to-convert-to-c-long>
while fitting the data using random_search_sg
How to resolve this? Is this related to the formats of scaled data and a_l
?
Regards,
Sanant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20170418/870bbfab/attachment.html>
More information about the scikit-learn
mailing list