sample_weight parameter with select_features method of CatboostRegressor

40 Views Asked by At

I am trying to use select_features from CatboostRegressor but I am getting an error that it does not support the sample_weight parameter. I need this to input exposures/offset for a Poisson loss model. I just want to make sure I am not doing anything incorrectly before I will probably have to submit a feature request or implement it on my own. Here is the code I'm using:

        model = CatBoostRegressor(cat_features=feature_names, 
                            task_type=args.task_type,
                            loss_function='Poisson',
                            use_best_model=True,
                            custom_metric=['Poisson','RMSE'],
                            **hyperparams)
    feature_dict = model.select_features(X=train_x, y=train_freq, eval_set=test_pool, features_for_select=feature_names, 
                                         num_features_to_select=args.num_features, plot_file='training_plot.html',
                                         sample_weight=train_exposure)
    # model.fit(X=train_x, y=train_freq, eval_set=test_pool, plot_file='training_plot.html', sample_weight=train_exposure)
0

There are 0 best solutions below