Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TypeError Traceback (most recent call last)
- /tmp/ipykernel_108/3276123617.py in <module>
- 100 )
- 101
- --> 102 randomized_search.fit(X_train, y_train)
- 103
- 104 y_test_pred = randomized_search.predict(X_test)
- /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
- 61 extra_args = len(args) - len(all_args)
- 62 if extra_args <= 0:
- ---> 63 return f(*args, **kwargs)
- 64
- 65 # extra_args > 0
- /opt/conda/lib/python3.9/site-packages/sklearn/model_selection/_search.py in fit(self, X, y, groups, **fit_params)
- 763 n_splits = cv_orig.get_n_splits(X, y, groups)
- 764
- --> 765 base_estimator = clone(self.estimator)
- 766
- 767 parallel = Parallel(n_jobs=self.n_jobs,
- /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
- 61 extra_args = len(args) - len(all_args)
- 62 if extra_args <= 0:
- ---> 63 return f(*args, **kwargs)
- 64
- 65 # extra_args > 0
- /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
- 74 new_object_params = estimator.get_params(deep=False)
- 75 for name, param in new_object_params.items():
- ---> 76 new_object_params[name] = clone(param, safe=False)
- 77 new_object = klass(**new_object_params)
- 78 params_set = new_object.get_params(deep=False)
- /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
- 61 extra_args = len(args) - len(all_args)
- 62 if extra_args <= 0:
- ---> 63 return f(*args, **kwargs)
- 64
- 65 # extra_args > 0
- /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
- 55 # XXX: not handling dictionaries
- 56 if estimator_type in (list, tuple, set, frozenset):
- ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
- 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
- 59 if not safe:
- /opt/conda/lib/python3.9/site-packages/sklearn/base.py in <listcomp>(.0)
- 55 # XXX: not handling dictionaries
- 56 if estimator_type in (list, tuple, set, frozenset):
- ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
- 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
- 59 if not safe:
- /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
- 61 extra_args = len(args) - len(all_args)
- 62 if extra_args <= 0:
- ---> 63 return f(*args, **kwargs)
- 64
- 65 # extra_args > 0
- /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
- 55 # XXX: not handling dictionaries
- 56 if estimator_type in (list, tuple, set, frozenset):
- ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
- 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
- 59 if not safe:
- /opt/conda/lib/python3.9/site-packages/sklearn/base.py in <listcomp>(.0)
- 55 # XXX: not handling dictionaries
- 56 if estimator_type in (list, tuple, set, frozenset):
- ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
- 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
- 59 if not safe:
- /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
- 61 extra_args = len(args) - len(all_args)
- 62 if extra_args <= 0:
- ---> 63 return f(*args, **kwargs)
- 64
- 65 # extra_args > 0
- /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
- 74 new_object_params = estimator.get_params(deep=False)
- 75 for name, param in new_object_params.items():
- ---> 76 new_object_params[name] = clone(param, safe=False)
- 77 new_object = klass(**new_object_params)
- 78 params_set = new_object.get_params(deep=False)
- /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
- 61 extra_args = len(args) - len(all_args)
- 62 if extra_args <= 0:
- ---> 63 return f(*args, **kwargs)
- 64
- 65 # extra_args > 0
- /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
- 55 # XXX: not handling dictionaries
- 56 if estimator_type in (list, tuple, set, frozenset):
- ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
- 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
- 59 if not safe:
- /opt/conda/lib/python3.9/site-packages/sklearn/base.py in <listcomp>(.0)
- 55 # XXX: not handling dictionaries
- 56 if estimator_type in (list, tuple, set, frozenset):
- ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
- 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
- 59 if not safe:
- /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
- 61 extra_args = len(args) - len(all_args)
- 62 if extra_args <= 0:
- ---> 63 return f(*args, **kwargs)
- 64
- 65 # extra_args > 0
- /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
- 55 # XXX: not handling dictionaries
- 56 if estimator_type in (list, tuple, set, frozenset):
- ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
- 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
- 59 if not safe:
- /opt/conda/lib/python3.9/site-packages/sklearn/base.py in <listcomp>(.0)
- 55 # XXX: not handling dictionaries
- 56 if estimator_type in (list, tuple, set, frozenset):
- ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
- 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
- 59 if not safe:
- /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
- 61 extra_args = len(args) - len(all_args)
- 62 if extra_args <= 0:
- ---> 63 return f(*args, **kwargs)
- 64
- 65 # extra_args > 0
- /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
- 74 new_object_params = estimator.get_params(deep=False)
- 75 for name, param in new_object_params.items():
- ---> 76 new_object_params[name] = clone(param, safe=False)
- 77 new_object = klass(**new_object_params)
- 78 params_set = new_object.get_params(deep=False)
- /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
- 61 extra_args = len(args) - len(all_args)
- 62 if extra_args <= 0:
- ---> 63 return f(*args, **kwargs)
- 64
- 65 # extra_args > 0
- /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
- 55 # XXX: not handling dictionaries
- 56 if estimator_type in (list, tuple, set, frozenset):
- ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
- 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
- 59 if not safe:
- /opt/conda/lib/python3.9/site-packages/sklearn/base.py in <listcomp>(.0)
- 55 # XXX: not handling dictionaries
- 56 if estimator_type in (list, tuple, set, frozenset):
- ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
- 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
- 59 if not safe:
- /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
- 61 extra_args = len(args) - len(all_args)
- 62 if extra_args <= 0:
- ---> 63 return f(*args, **kwargs)
- 64
- 65 # extra_args > 0
- /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
- 55 # XXX: not handling dictionaries
- 56 if estimator_type in (list, tuple, set, frozenset):
- ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
- 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
- 59 if not safe:
- /opt/conda/lib/python3.9/site-packages/sklearn/base.py in <listcomp>(.0)
- 55 # XXX: not handling dictionaries
- 56 if estimator_type in (list, tuple, set, frozenset):
- ---> 57 return estimator_type([clone(e, safe=safe) for e in estimator])
- 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
- 59 if not safe:
- /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
- 61 extra_args = len(args) - len(all_args)
- 62 if extra_args <= 0:
- ---> 63 return f(*args, **kwargs)
- 64
- 65 # extra_args > 0
- /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
- 74 new_object_params = estimator.get_params(deep=False)
- 75 for name, param in new_object_params.items():
- ---> 76 new_object_params[name] = clone(param, safe=False)
- 77 new_object = klass(**new_object_params)
- 78 params_set = new_object.get_params(deep=False)
- /opt/conda/lib/python3.9/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
- 61 extra_args = len(args) - len(all_args)
- 62 if extra_args <= 0:
- ---> 63 return f(*args, **kwargs)
- 64
- 65 # extra_args > 0
- /opt/conda/lib/python3.9/site-packages/sklearn/base.py in clone(estimator, safe)
- 58 elif not hasattr(estimator, 'get_params') or isinstance(estimator, type):
- 59 if not safe:
- ---> 60 return copy.deepcopy(estimator)
- 61 else:
- 62 if isinstance(estimator, type):
- /opt/conda/lib/python3.9/copy.py in deepcopy(x, memo, _nil)
- 159 reductor = getattr(x, "__reduce_ex__", None)
- 160 if reductor is not None:
- --> 161 rv = reductor(4)
- 162 else:
- 163 reductor = getattr(x, "__reduce__", None)
- TypeError: cannot pickle 'module' object
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement