2

I've run the following code using the CatBoostClassifier in other notebooks. However, when I repeat the same process with the same parameters using the CatBoostRegressor, I get an error about the Custom Logger. Any help would be appreciated.

from catboost import CatBoostRegressor
from mlxtend.feature_selection import SequentialFeatureSelector as SFS
from sklearn.compose import ColumnTransformer

transformer = ColumnTransformer(
[('category', OneHotEncoder(), cat_cols),
('num', StandardScaler(), num_cols)],
remainder='passthrough')

sfs = SFS(CatBoostRegressor(iterations=100, verbose=False), 
           k_features=X_train.shape[1], 
           forward=True, 
           floating=False, 
           verbose=2,
           scoring='r2',
           cv=5)

sfs = sfs.fit(transformer.fit_transform(X_train), np.array(y_train))

> [Parallel(n_jobs=1)]: Using backend SequentialBackend with 1
> concurrent workers. [Parallel(n_jobs=1)]: Done   1 out of   1 |
> elapsed:    3.4s remaining:    0.0s Custom logger is already
> specified. Specify more than one logger at same time is not thread
> safe.Custom logger is already specified. Specify more than one logger
> at same time is not thread safe.

0 Answers0