Advertisement
Pavel_Step

Untitled

Jan 23rd, 2024
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.84 KB | None | 0 0
  1. TypeError Traceback (most recent call last)
  2. /tmp/ipykernel_108/3276123617.py in <module>
  3. 100 )
  4. 101
  5. --> 102 randomized_search.fit(X_train, y_train)
  6. 103
  7. 104 y_test_pred = randomized_search.predict(X_test)
  8.  
  9. /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
  10. 61 extra_args = len(args) - len(all_args)
  11. 62 if extra_args <= 0:
  12. ---> 63 return f(*args, **kwargs)
  13. 64
  14. 65 # extra_args > 0
  15.  
  16. /opt/conda/lib/python3.9/site-packages/sklearn/model_selection/_search.py in fit(self, X, y, groups, **fit_params)
  17. 763 n_splits = cv_orig.get_n_splits(X, y, groups)
  18. 764
  19. --> 765 base_estimator = clone(self.estimator)
  20. 766
  21. 767 parallel = Parallel(n_jobs=self.n_jobs,
  22.  
  23. /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
  24. 61 extra_args = len(args) - len(all_args)
  25. 62 if extra_args <= 0:
  26. ---> 63 return f(*args, **kwargs)
  27. 64
  28. 65 # extra_args > 0
  29.  
  30. /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
  31. 74 new_object_params = estimator.get_params(deep=False)
  32. 75 for name, param in new_object_params.items():
  33. ---> 76 new_object_params[name] = clone(param, safe=False)
  34. 77 new_object = klass(**new_object_params)
  35. 78 params_set = new_object.get_params(deep=False)
  36.  
  37. /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
  38. 61 extra_args = len(args) - len(all_args)
  39. 62 if extra_args <= 0:
  40. ---> 63 return f(*args, **kwargs)
  41. 64
  42. 65 # extra_args > 0
  43.  
  44. /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
  45. 55 # XXX: not handling dictionaries
  46. 56 if estimator_type in (list, tuple, set, frozenset):
  47. ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
  48. 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
  49. 59 if not safe:
  50.  
  51. /opt/conda/lib/python3.9/site-packages/sklearn/base.py in <listcomp>(.0)
  52. 55 # XXX: not handling dictionaries
  53. 56 if estimator_type in (list, tuple, set, frozenset):
  54. ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
  55. 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
  56. 59 if not safe:
  57.  
  58. /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
  59. 61 extra_args = len(args) - len(all_args)
  60. 62 if extra_args <= 0:
  61. ---> 63 return f(*args, **kwargs)
  62. 64
  63. 65 # extra_args > 0
  64.  
  65. /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
  66. 55 # XXX: not handling dictionaries
  67. 56 if estimator_type in (list, tuple, set, frozenset):
  68. ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
  69. 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
  70. 59 if not safe:
  71.  
  72. /opt/conda/lib/python3.9/site-packages/sklearn/base.py in <listcomp>(.0)
  73. 55 # XXX: not handling dictionaries
  74. 56 if estimator_type in (list, tuple, set, frozenset):
  75. ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
  76. 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
  77. 59 if not safe:
  78.  
  79. /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
  80. 61 extra_args = len(args) - len(all_args)
  81. 62 if extra_args <= 0:
  82. ---> 63 return f(*args, **kwargs)
  83. 64
  84. 65 # extra_args > 0
  85.  
  86. /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
  87. 74 new_object_params = estimator.get_params(deep=False)
  88. 75 for name, param in new_object_params.items():
  89. ---> 76 new_object_params[name] = clone(param, safe=False)
  90. 77 new_object = klass(**new_object_params)
  91. 78 params_set = new_object.get_params(deep=False)
  92.  
  93. /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
  94. 61 extra_args = len(args) - len(all_args)
  95. 62 if extra_args <= 0:
  96. ---> 63 return f(*args, **kwargs)
  97. 64
  98. 65 # extra_args > 0
  99.  
  100. /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
  101. 55 # XXX: not handling dictionaries
  102. 56 if estimator_type in (list, tuple, set, frozenset):
  103. ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
  104. 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
  105. 59 if not safe:
  106.  
  107. /opt/conda/lib/python3.9/site-packages/sklearn/base.py in <listcomp>(.0)
  108. 55 # XXX: not handling dictionaries
  109. 56 if estimator_type in (list, tuple, set, frozenset):
  110. ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
  111. 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
  112. 59 if not safe:
  113.  
  114. /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
  115. 61 extra_args = len(args) - len(all_args)
  116. 62 if extra_args <= 0:
  117. ---> 63 return f(*args, **kwargs)
  118. 64
  119. 65 # extra_args > 0
  120.  
  121. /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
  122. 55 # XXX: not handling dictionaries
  123. 56 if estimator_type in (list, tuple, set, frozenset):
  124. ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
  125. 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
  126. 59 if not safe:
  127.  
  128. /opt/conda/lib/python3.9/site-packages/sklearn/base.py in <listcomp>(.0)
  129. 55 # XXX: not handling dictionaries
  130. 56 if estimator_type in (list, tuple, set, frozenset):
  131. ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
  132. 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
  133. 59 if not safe:
  134.  
  135. /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
  136. 61 extra_args = len(args) - len(all_args)
  137. 62 if extra_args <= 0:
  138. ---> 63 return f(*args, **kwargs)
  139. 64
  140. 65 # extra_args > 0
  141.  
  142. /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
  143. 74 new_object_params = estimator.get_params(deep=False)
  144. 75 for name, param in new_object_params.items():
  145. ---> 76 new_object_params[name] = clone(param, safe=False)
  146. 77 new_object = klass(**new_object_params)
  147. 78 params_set = new_object.get_params(deep=False)
  148.  
  149. /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
  150. 61 extra_args = len(args) - len(all_args)
  151. 62 if extra_args <= 0:
  152. ---> 63 return f(*args, **kwargs)
  153. 64
  154. 65 # extra_args > 0
  155.  
  156. /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
  157. 55 # XXX: not handling dictionaries
  158. 56 if estimator_type in (list, tuple, set, frozenset):
  159. ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
  160. 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
  161. 59 if not safe:
  162.  
  163. /opt/conda/lib/python3.9/site-packages/sklearn/base.py in <listcomp>(.0)
  164. 55 # XXX: not handling dictionaries
  165. 56 if estimator_type in (list, tuple, set, frozenset):
  166. ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
  167. 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
  168. 59 if not safe:
  169.  
  170. /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
  171. 61 extra_args = len(args) - len(all_args)
  172. 62 if extra_args <= 0:
  173. ---> 63 return f(*args, **kwargs)
  174. 64
  175. 65 # extra_args > 0
  176.  
  177. /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
  178. 55 # XXX: not handling dictionaries
  179. 56 if estimator_type in (list, tuple, set, frozenset):
  180. ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
  181. 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
  182. 59 if not safe:
  183.  
  184. /opt/conda/lib/python3.9/site-packages/sklearn/base.py in <listcomp>(.0)
  185. 55 # XXX: not handling dictionaries
  186. 56 if estimator_type in (list, tuple, set, frozenset):
  187. ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
  188. 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
  189. 59 if not safe:
  190.  
  191. /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
  192. 61 extra_args = len(args) - len(all_args)
  193. 62 if extra_args <= 0:
  194. ---> 63 return f(*args, **kwargs)
  195. 64
  196. 65 # extra_args > 0
  197.  
  198. /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
  199. 74 new_object_params = estimator.get_params(deep=False)
  200. 75 for name, param in new_object_params.items():
  201. ---> 76 new_object_params[name] = clone(param, safe=False)
  202. 77 new_object = klass(**new_object_params)
  203. 78 params_set = new_object.get_params(deep=False)
  204.  
  205. /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
  206. 61 extra_args = len(args) - len(all_args)
  207. 62 if extra_args <= 0:
  208. ---> 63 return f(*args, **kwargs)
  209. 64
  210. 65 # extra_args > 0
  211.  
  212. /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
  213. 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
  214. 59 if not safe:
  215. ---> 60 return copy.deepcopy(estimator)
  216. 61 else:
  217. 62 if isinstance(estimator, type):
  218.  
  219. /opt/conda/lib/python3.9/copy.py in deepcopy(x, memo, _nil)
  220. 159 reductor = getattr(x, "__reduce_ex__", None)
  221. 160 if reductor is not None:
  222. --> 161 rv = reductor(4)
  223. 162 else:
  224. 163 reductor = getattr(x, "__reduce__", None)
  225.  
  226. TypeError: cannot pickle 'module' object
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement