---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-9-8f860b18794f> in <module>()
1 clf = GBC()
2 clfbag = BaggingClassifier(clf, n_estimators=5)
----> 3 check_classifier(Xtrain, ytrain, Xtest, ytest,clfbag )
4
5 clf = GBC()
<ipython-input-8-d806c0394eef> in check_classifier(Xtrain, ytrain, Xtest, ytest, clf)
1 def check_classifier(Xtrain, ytrain, Xtest, ytest, clf):
----> 2 clf.fit(Xtrain, ytrain)
3 print clf.score(Xtrain, ytrain)
4 print clf.score(Xtest, ytest)
/Users/martiom/anaconda/lib/python2.7/site-packages/sklearn/ensemble/bagging.pyc in fit(self, X, y, sample_weight)
335 seeds[starts[i]:starts[i + 1]],
336 verbose=self.verbose)
--> 337 for i in range(n_jobs))
338
339 # Reduce
/Users/martiom/anaconda/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.pyc in __call__(self, iterable)
802 self._iterating = True
803
--> 804 while self.dispatch_one_batch(iterator):
805 pass
806
/Users/martiom/anaconda/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.pyc in dispatch_one_batch(self, iterator)
660 return False
661 else:
--> 662 self._dispatch(tasks)
663 return True
664
/Users/martiom/anaconda/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.pyc in _dispatch(self, batch)
568
569 if self._pool is None:
--> 570 job = ImmediateComputeBatch(batch)
571 self._jobs.append(job)
572 self.n_dispatched_batches += 1
/Users/martiom/anaconda/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.pyc in __init__(self, batch)
181 # Don't delay the application, to avoid keeping the input
182 # arguments in memory
--> 183 self.results = batch()
184
185 def get(self):
/Users/martiom/anaconda/lib/python2.7/site-packages/sklearn/externals/joblib/parallel.pyc in __call__(self)
70
71 def __call__(self):
---> 72 return [func(*args, **kwargs) for func, args, kwargs in self.items]
73
74 def __len__(self):
/Users/martiom/anaconda/lib/python2.7/site-packages/sklearn/ensemble/bagging.pyc in _parallel_build_estimators(n_estimators, ensemble, X, y, sample_weight, seeds, verbose)
111 curr_sample_weight[not_indices] = 0
112
--> 113 estimator.fit(X[:, features], y, sample_weight=curr_sample_weight)
114 samples = curr_sample_weight > 0.
115
/Users/martiom/anaconda/lib/python2.7/site-packages/sklearn/ensemble/gradient_boosting.pyc in fit(self, X, y, sample_weight, monitor)
1023 # fit the boosting stages
1024 n_stages = self._fit_stages(X, y, y_pred, sample_weight, random_state,
-> 1025 begin_at_stage, monitor, X_idx_sorted)
1026 # change shape of arrays after fit (early-stopping or additional ests)
1027 if n_stages != self.estimators_.shape[0]:
/Users/martiom/anaconda/lib/python2.7/site-packages/sklearn/ensemble/gradient_boosting.pyc in _fit_stages(self, X, y, y_pred, sample_weight, random_state, begin_at_stage, monitor, X_idx_sorted)
1078 y_pred = self._fit_stage(i, X, y, y_pred, sample_weight,
1079 sample_mask, random_state, X_idx_sorted,
-> 1080 X_csc, X_csr)
1081
1082 # track deviance (= loss)
/Users/martiom/anaconda/lib/python2.7/site-packages/sklearn/ensemble/gradient_boosting.pyc in _fit_stage(self, i, X, y, y_pred, sample_weight, sample_mask, random_state, X_idx_sorted, X_csc, X_csr)
782 else:
783 tree.fit(X, residual, sample_weight=sample_weight,
--> 784 check_input=False, X_idx_sorted=X_idx_sorted)
785
786 # update tree leaves
/Users/martiom/anaconda/lib/python2.7/site-packages/sklearn/tree/tree.pyc in fit(self, X, y, sample_weight, check_input, X_idx_sorted)
304 # into each tree.
305 if X_idx_sorted is None and presort:
--> 306 X_idx_sorted = np.asfortranarray(np.argsort(X, axis=0),
307 dtype=np.int32)
308
/Users/martiom/anaconda/lib/python2.7/site-packages/numpy/core/fromnumeric.pyc in argsort(a, axis, kind, order)
906 except AttributeError:
907 return _wrapit(a, 'argsort', axis, kind, order)
--> 908 return argsort(axis, kind, order)
909
910
KeyboardInterrupt: