---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-292-15780aa07245> in <module>()
4 {'clf__n_estimators': [2**i for i in range(5)], 'clf__criterion':['entropy']}]
5 gs = GridSearchCV(estimator=forest_pipe, param_grid=param_grid, scoring='accuracy', cv=10, n_jobs = -1)
----> 6 gs.fit(_X_train, _y_train)
7 print(gs.best_score_)
8 print(gs.best_params_)
C:\Users\johannes\Anaconda3\lib\site-packages\sklearn\model_selection\_search.py in fit(self, X, y, groups)
943 train/test set.
944 """
--> 945 return self._fit(X, y, groups, ParameterGrid(self.param_grid))
946
947
C:\Users\johannes\Anaconda3\lib\site-packages\sklearn\model_selection\_search.py in _fit(self, X, y, groups, parameter_iterable)
540 self.scorer_ = check_scoring(self.estimator, scoring=self.scoring)
541
--> 542 X, y, groups = indexable(X, y, groups)
543 n_splits = cv.get_n_splits(X, y, groups)
544 if self.verbose > 0 and isinstance(parameter_iterable, Sized):
C:\Users\johannes\Anaconda3\lib\site-packages\sklearn\utils\validation.py in indexable(*iterables)
204 else:
205 result.append(np.array(X))
--> 206 check_consistent_length(*result)
207 return result
208
C:\Users\johannes\Anaconda3\lib\site-packages\sklearn\utils\validation.py in check_consistent_length(*arrays)
175 """
176
--> 177 lengths = [_num_samples(X) for X in arrays if X is not None]
178 uniques = np.unique(lengths)
179 if len(uniques) > 1:
C:\Users\johannes\Anaconda3\lib\site-packages\sklearn\utils\validation.py in <listcomp>(.0)
175 """
176
--> 177 lengths = [_num_samples(X) for X in arrays if X is not None]
178 uniques = np.unique(lengths)
179 if len(uniques) > 1:
C:\Users\johannes\Anaconda3\lib\site-packages\sklearn\utils\validation.py in _num_samples(x)
114 # Don't get num_samples from an ensembles length!
115 raise TypeError('Expected sequence or array-like, got '
--> 116 'estimator %s' % x)
117 if not hasattr(x, '__len__') and not hasattr(x, 'shape'):
118 if hasattr(x, '__array__'):
TypeError: Expected sequence or array-like, got estimator considerably communicate fixed ideal invested distort \
7723 0.0 0.0 0.0 0.0 0.0 0.0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0 0.0 0.0 0.0
8970 0.0 0.0 0.0 0.0 0.0 0.0
3850 0.0 0.0 0.0 0.0 0.0 0.0
9268 0.0 0.0 0.0 0.0 0.0 0.0
13170 0.0 0.0 0.0 0.0 0.0 0.0
8157 0.0 0.0 0.0 0.0 0.0 0.0
12956 0.0 0.0 0.0 0.0 0.0 0.0
7624 0.0 0.0 0.0 0.0 0.0 0.0
5487 0.0 0.0 0.0 0.0 0.0 0.0
4192 0.0 0.0 0.0 0.0 0.0 0.0
11175 0.0 0.0 0.0 0.0 0.0 0.0
13124 0.0 0.0 0.0 0.0 0.0 0.0
5474 0.0 0.0 0.0 0.0 0.0 0.0
7975 0.0 0.0 0.0 0.0 0.0 0.0
9500 0.0 0.0 0.0 0.0 0.0 0.0
2830 0.0 0.0 0.0 0.0 0.0 0.0
14890 0.0 0.0 0.0 0.0 0.0 0.0
7226 0.0 0.0 0.0 0.0 0.0 0.0
4071 0.0 0.0 0.0 0.0 0.0 0.0
4100 0.0 0.0 0.0 0.0 0.0 0.0
7414 0.0 0.0 0.0 0.0 0.0 0.0
9002 0.0 0.0 0.0 0.0 0.0 0.0
perspective rom counts recycle ... ('my', 'head') \
7723 0.0 0.0 0.0 0.0 ... 0.0
14424 0.0 0.0 0.0 0.0 ... 0.0
972 0.0 0.0 0.0 0.0 ... 0.0
377 0.0 0.0 0.0 0.0 ... 0.0
2895 0.0 0.0 0.0 0.0 ... 0.0
3220 0.0 0.0 0.0 0.0 ... 0.0
11581 0.0 0.0 0.0 0.0 ... 0.0
1080 0.0 0.0 0.0 0.0 ... 0.0
7002 0.0 0.0 0.0 0.0 ... 0.0
6871 0.0 0.0 0.0 0.0 ... 0.0
10930 0.0 0.0 0.0 0.0 ... 0.0
11101 0.0 0.0 0.0 0.0 ... 0.0
7907 0.0 0.0 0.0 0.0 ... 0.0
5025 0.0 0.0 0.0 0.0 ... 0.0
13715 0.0 0.0 0.0 0.0 ... 0.0
7324 0.0 0.0 0.0 0.0 ... 0.0
7851 0.0 0.0 0.0 0.0 ... 0.0
5373 0.0 0.0 0.0 0.0 ... 0.0
12244 0.0 0.0 0.0 0.0 ... 0.0
13110 0.0 0.0 0.0 0.0 ... 0.0
14300 0.0 0.0 0.0 0.0 ... 0.0
11748 0.0 0.0 0.0 0.0 ... 0.0
4091 0.0 0.0 0.0 0.0 ... 0.0
9931 0.0 0.0 0.0 0.0 ... 0.0
1300 0.0 0.0 0.0 0.0 ... 0.0
5694 0.0 0.0 0.0 0.0 ... 0.0
9593 0.0 0.0 0.0 0.0 ... 0.0
14975 0.0 0.0 0.0 0.0 ... 0.0
4508 0.0 0.0 0.0 0.0 ... 0.0
6114 0.0 0.0 0.0 0.0 ... 0.0
... ... ... ... ... ... ...
8215 0.0 0.0 0.0 0.0 ... 0.0
4548 0.0 0.0 0.0 0.0 ... 0.0
169 0.0 0.0 0.0 0.0 ... 0.0
4309 0.0 0.0 0.0 0.0 ... 0.0
1568 0.0 0.0 0.0 0.0 ... 0.0
12882 0.0 0.0 0.0 0.0 ... 0.0
11370 0.0 0.0 0.0 0.0 ... 0.0
1034 0.0 0.0 0.0 0.0 ... 0.0
8834 0.0 0.0 0.0 0.0 ... 0.0
8970 0.0 0.0 0.0 0.0 ... 0.0
3850 0.0 0.0 0.0 0.0 ... 0.0
9268 0.0 0.0 0.0 0.0 ... 0.0
13170 0.0 0.0 0.0 0.0 ... 0.0
8157 0.0 0.0 0.0 0.0 ... 0.0
12956 0.0 0.0 0.0 0.0 ... 0.0
7624 0.0 0.0 0.0 0.0 ... 0.0
5487 0.0 0.0 0.0 0.0 ... 0.0
4192 0.0 0.0 0.0 0.0 ... 0.0
11175 0.0 0.0 0.0 0.0 ... 0.0
13124 0.0 0.0 0.0 0.0 ... 0.0
5474 0.0 0.0 0.0 0.0 ... 0.0
7975 0.0 0.0 0.0 0.0 ... 0.0
9500 0.0 0.0 0.0 0.0 ... 0.0
2830 0.0 0.0 0.0 0.0 ... 0.0
14890 0.0 0.0 0.0 0.0 ... 0.0
7226 0.0 0.0 0.0 0.0 ... 0.0
4071 0.0 0.0 0.0 0.0 ... 0.0
4100 0.0 0.0 0.0 0.0 ... 0.0
7414 0.0 0.0 0.0 0.0 ... 0.0
9002 0.0 0.0 0.0 0.0 ... 1.0
('a', 'more') ('for', 'over') ('to', '.') ('light', ',') \
7723 0.0 0.0 0.0 0.0
14424 0.0 0.0 0.0 0.0
972 0.0 0.0 0.0 0.0
377 0.0 0.0 0.0 0.0
2895 0.0 0.0 0.0 0.0
3220 0.0 0.0 0.0 0.0
11581 0.0 0.0 0.0 0.0
1080 0.0 0.0 0.0 0.0
7002 0.0 0.0 0.0 0.0
6871 0.0 0.0 0.0 0.0
10930 0.0 1.0 0.0 0.0
11101 0.0 0.0 0.0 0.0
7907 0.0 0.0 0.0 0.0
5025 0.0 0.0 0.0 0.0
13715 0.0 0.0 0.0 0.0
7324 0.0 0.0 0.0 0.0
7851 0.0 0.0 0.0 0.0
5373 0.0 0.0 0.0 0.0
12244 0.0 0.0 0.0 0.0
13110 0.0 0.0 0.0 0.0
14300 0.0 0.0 0.0 0.0
11748 0.0 0.0 0.0 0.0
4091 0.0 0.0 0.0 0.0
9931 0.0 0.0 0.0 0.0
1300 0.0 0.0 0.0 0.0
5694 0.0 0.0 0.0 0.0
9593 0.0 0.0 0.0 0.0
14975 0.0 0.0 0.0 0.0
4508 0.0 0.0 0.0 0.0
6114 0.0 0.0 0.0 0.0
... ... ... ... ...
8215 0.0 0.0 0.0 0.0
4548 0.0 0.0 0.0 0.0
169 0.0 0.0 0.0 0.0
4309 0.0 0.0 0.0 0.0
1568 0.0 0.0 0.0 0.0
12882 0.0 0.0 0.0 0.0
11370 0.0 0.0 0.0 0.0
1034 0.0 0.0 0.0 0.0
8834 0.0 0.0 0.0 0.0
8970 0.0 0.0 0.0 0.0
3850 0.0 0.0 0.0 0.0
9268 0.0 0.0 0.0 0.0
13170 0.0 0.0 0.0 1.0
8157 0.0 0.0 0.0 0.0
12956 0.0 0.0 0.0 0.0
7624 0.0 0.0 0.0 0.0
5487 0.0 0.0 0.0 0.0
4192 0.0 0.0 0.0 0.0
11175 0.0 0.0 0.0 0.0
13124 0.0 0.0 0.0 0.0
5474 0.0 0.0 0.0 0.0
7975 0.0 0.0 0.0 0.0
9500 0.0 0.0 0.0 0.0
2830 0.0 0.0 0.0 0.0
14890 0.0 0.0 0.0 0.0
7226 0.0 0.0 0.0 0.0
4071 0.0 0.0 0.0 0.0
4100 0.0 0.0 0.0 0.0
7414 0.0 0.0 0.0 0.0
9002 0.0 0.0 0.0 0.0
('and', 'all') ('love', 'this') ('a', 'must') ('my', 'lens') \
7723 0.0 0.0 0.0 0.0
14424 0.0 0.0 0.0 0.0
972 0.0 0.0 0.0 0.0
377 0.0 0.0 0.0 0.0
2895 0.0 0.0 0.0 0.0
3220 0.0 0.0 0.0 0.0
11581 0.0 0.0 0.0 0.0
1080 0.0 0.0 0.0 0.0
7002 0.0 0.0 0.0 0.0
6871 0.0 0.0 0.0 0.0
10930 0.0 0.0 0.0 0.0
11101 0.0 0.0 0.0 0.0
7907 0.0 0.0 0.0 0.0
5025 0.0 0.0 0.0 0.0
13715 0.0 0.0 0.0 0.0
7324 0.0 0.0 0.0 0.0
7851 0.0 0.0 0.0 0.0
5373 0.0 0.0 0.0 0.0
12244 0.0 0.0 0.0 0.0
13110 0.0 0.0 0.0 0.0
14300 0.0 0.0 0.0 0.0
11748 0.0 0.0 0.0 0.0
4091 0.0 0.0 0.0 0.0
9931 0.0 0.0 0.0 0.0
1300 0.0 0.0 0.0 0.0
5694 0.0 0.0 0.0 0.0
9593 0.0 0.0 0.0 0.0
14975 0.0 0.0 0.0 0.0
4508 0.0 0.0 0.0 0.0
6114 0.0 0.0 0.0 0.0
... ... ... ... ...
8215 0.0 0.0 0.0 0.0
4548 0.0 0.0 0.0 0.0
169 0.0 0.0 0.0 0.0
4309 0.0 1.0 0.0 0.0
1568 0.0 0.0 0.0 0.0
12882 0.0 0.0 0.0 0.0
11370 0.0 0.0 0.0 0.0
1034 0.0 0.0 0.0 0.0
8834 0.0 0.0 0.0 0.0
8970 1.0 0.0 0.0 0.0
3850 0.0 0.0 0.0 0.0
9268 0.0 0.0 0.0 0.0
13170 0.0 0.0 0.0 0.0
8157 0.0 0.0 0.0 0.0
12956 0.0 0.0 0.0 0.0
7624 0.0 0.0 0.0 0.0
5487 0.0 0.0 0.0 0.0
4192 0.0 0.0 0.0 0.0
11175 0.0 0.0 0.0 0.0
13124 0.0 0.0 0.0 0.0
5474 0.0 0.0 0.0 0.0
7975 0.0 0.0 0.0 0.0
9500 0.0 0.0 0.0 0.0
2830 0.0 0.0 0.0 0.0
14890 0.0 0.0 0.0 0.0
7226 0.0 0.0 0.0 0.0
4071 0.0 0.0 0.0 0.0
4100 0.0 0.0 0.0 0.0
7414 0.0 0.0 0.0 0.0
9002 0.0 0.0 0.0 0.0
('got', 'it')
7723 0.0
14424 0.0
972 0.0
377 0.0
2895 0.0
3220 0.0
11581 0.0
1080 0.0
7002 0.0
6871 0.0
10930 0.0
11101 0.0
7907 0.0
5025 0.0
13715 0.0
7324 0.0
7851 0.0
5373 0.0
12244 0.0
13110 0.0
14300 0.0
11748 0.0
4091 0.0
9931 0.0
1300 0.0
5694 0.0
9593 0.0
14975 0.0
4508 1.0
6114 0.0
... ...
8215 0.0
4548 0.0
169 0.0
4309 0.0
1568 0.0
12882 0.0
11370 0.0
1034 0.0
8834 0.0
8970 0.0
3850 0.0
9268 0.0
13170 0.0
8157 0.0
12956 0.0
7624 0.0
5487 0.0
4192 0.0
11175 0.0
13124 0.0
5474 0.0
7975 0.0
9500 0.0
2830 0.0
14890 0.0
7226 0.0
4071 0.0
4100 0.0
7414 0.0
9002 0.0
[8987 rows x 3043 columns]