catboost icon indicating copy to clipboard operation
catboost copied to clipboard

Enhance Pool constructor from array-like objects

Open Yura52 opened this issue 8 years ago • 2 comments

Hello! The problem is that the constructor from array-like objects does not support all the features available in the constructor from (dataset_description_file + column_description).

For example, if I have a workflow where I process data and create features and one of my feature is Timestamp I have to manually create a csv-like file and a column_description file just to tell Catboost that one of my features is Timestamp. I have to write some boilerplate functions in order to automate that. It's very inconvenient.

Probably, a good way to deal with it is to support list-like and dict-like objects as the column_description argument. It the first case something like ['Label', 'Num', 'Num', 'Timestamp', 'Categ'] is expected and in the second one {0: 'Label', 3: 'Timestamp', 4: 'Categ'}. Obviously, some other cases like "label argument is not None" should be taken into account. Also it would be convenient to have a possibility to use feature names instead of indices if feature names can be inferred from dataframe or explicitly given as a separate parameter.

Yura52 avatar Apr 01 '18 17:04 Yura52

This is a nice idea. And a good thing for contribution!

annaveronika avatar Apr 04 '18 16:04 annaveronika

It will be done #1597

VlasovKirill avatar Apr 09 '21 10:04 VlasovKirill