Pool used in CatBoost as a data structure to train model from.
| 601 | |
| 602 | |
| 603 | class Pool(_PoolBase): |
| 604 | """ |
| 605 | Pool used in CatBoost as a data structure to train model from. |
| 606 | """ |
| 607 | |
| 608 | def __init__( |
| 609 | self, |
| 610 | data, |
| 611 | label=None, |
| 612 | cat_features=None, |
| 613 | text_features=None, |
| 614 | embedding_features=None, |
| 615 | embedding_features_data=None, |
| 616 | column_description=None, |
| 617 | pairs=None, |
| 618 | graph=None, |
| 619 | delimiter='\t', |
| 620 | has_header=False, |
| 621 | ignore_csv_quoting=False, |
| 622 | weight=None, |
| 623 | group_id=None, |
| 624 | group_weight=None, |
| 625 | subgroup_id=None, |
| 626 | pairs_weight=None, |
| 627 | baseline=None, |
| 628 | timestamp=None, |
| 629 | feature_names=None, |
| 630 | feature_tags=None, |
| 631 | thread_count=-1, |
| 632 | log_cout=None, |
| 633 | log_cerr=None, |
| 634 | data_can_be_none=False |
| 635 | ): |
| 636 | """ |
| 637 | Pool is an internal data structure that is used by CatBoost. |
| 638 | You can construct Pool from list, numpy.ndarray, pandas.DataFrame, pandas.Series. |
| 639 | |
| 640 | Parameters |
| 641 | ---------- |
| 642 | data : list or numpy.ndarray or pandas.DataFrame or pandas.Series or polars.DataFrame or FeaturesData or string or os.PathLike |
| 643 | Data source of Pool. |
| 644 | If list or numpy.ndarrays or pandas.DataFrame or pandas.Series or polars.DataFrame, |
| 645 | giving 2 dimensional array like data. |
| 646 | If FeaturesData - see FeaturesData description for details, 'cat_features' and 'feature_names' |
| 647 | parameters must be equal to None in this case |
| 648 | If string or os.PathLike, giving the path to the file with data in catboost format. |
| 649 | If string starts with "quantized://", the file has to contain quantized dataset saved with Pool.save(). |
| 650 | |
| 651 | label : list or numpy.ndarrays or pandas.DataFrame or pandas.Series or polars.DataFrame or polars.Series, optional (default=None) |
| 652 | Labels data. |
| 653 | If not None, can be a single- or two- dimensional array with either: |
| 654 | - numerical values - for regression (including multiregression), ranking and binary classification problems |
| 655 | - class labels (boolean, integer or string) - for classification (including multiclassification) problems |
| 656 | If `data` parameter points to a file, Label data is loaded from it as well. This parameter must |
| 657 | be None in this case. |
| 658 | |
| 659 | cat_features : list or numpy.ndarray, optional (default=None) |
| 660 | If not None, giving the list of Categ features indices or names. |
no outgoing calls