Traceback (most recent call last):


 "/opt/miniconda/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3319, in run_code

exec(code_obj, self.user_global_ns, self.user_ns)


 "<ipython-input-2-7c572d1b8c2f>", line 41, in <module>

res = cross_val_predict(cls, data.loc[:, ["A"]], data.loc[:, "B"], cv=2)


 "/opt/miniconda/lib/python3.7/site-packages/sklearn/model_selection/_validation.py", line 755, in cross_val_predict

for train, test in cv.split(X, y, groups))


 "/opt/miniconda/lib/python3.7/site-packages/joblib/parallel.py", line 921, in __call__

if self.dispatch_one_batch(iterator):


 "/opt/miniconda/lib/python3.7/site-packages/joblib/parallel.py", line 759, in dispatch_one_batch

self._dispatch(tasks)


 "/opt/miniconda/lib/python3.7/site-packages/joblib/parallel.py", line 716, in _dispatch

job = self._backend.apply_async(batch, callback=cb)


 "/opt/miniconda/lib/python3.7/site-packages/joblib/_parallel_backends.py", line 182, in apply_async

result = ImmediateResult(func)


 "/opt/miniconda/lib/python3.7/site-packages/joblib/_parallel_backends.py", line 549, in __init__

self.results = batch()


 "/opt/miniconda/lib/python3.7/site-packages/joblib/parallel.py", line 225, in __call__

for func, args, kwargs in self.items]


 "/opt/miniconda/lib/python3.7/site-packages/joblib/parallel.py", line 225, in <listcomp>

for func, args, kwargs in self.items]


 "/opt/miniconda/lib/python3.7/site-packages/sklearn/model_selection/_validation.py", line 841, in _fit_and_predict

estimator.fit(X_train, y_train, **fit_params)


 "<ipython-input-2-7c572d1b8c2f>", line 20, in fit

X = self.encoder.transform(X)


 "/opt/miniconda/lib/python3.7/site-packages/category_encoders/binary.py", line 125, in transform

return self.base_n_encoder.transform(X)


 "/opt/miniconda/lib/python3.7/site-packages/category_encoders/basen.py", line 214, in transform

raise ValueError('Must train encoder before it can be used to transform data.')
ValueError: Must train encoder before it can be used to transform data.

Traceback (most recent call last):


 "/usr/lib/python3.8/site-packages/libqtile/hook.py", line 365, in _subscribe

lst.remove(func)
ValueError: list.remove(x): x not in list
