How to use the catboost.python-package.catboost.eval.factor_utils.FactorUtils function in catboost

To help you get started, we’ve selected a few catboost examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github catboost / catboost / catboost / python-package / catboost / eval / factor_utils.py View on Github external
def create_label(all_eval_features, removed_features, label_mode):
        eval_features = set(all_eval_features)
        if label_mode == LabelMode.AddFeature:
            add_features = eval_features - set(removed_features)
            return "Features: {}".format(FactorUtils.factors_to_ranges_string(add_features))
        else:
            return "Ignore: {}".format(FactorUtils.factors_to_ranges_string(set(removed_features)))
github catboost / catboost / catboost / python-package / catboost / eval / factor_utils.py View on Github external
def factors_to_ranges_string(factors_set):
        if factors_set is None or len(factors_set) == 0:
            return "None"
        grouped_factors = FactorUtils.group_factors_by_range(factors_set)

        return ';'.join([FactorUtils.single_range_to_string(min(x), max(x)) for x in grouped_factors])
github catboost / catboost / catboost / python-package / catboost / eval / factor_utils.py View on Github external
def compress_string_factors(string_factors):
        factors = FactorUtils.extract_factors(string_factors)
        compressed_string_factors = FactorUtils.factors_to_string(factors)
        return compressed_string_factors
github catboost / catboost / catboost / python-package / catboost / eval / factor_utils.py View on Github external
def compress_string_factors(string_factors):
        factors = FactorUtils.extract_factors(string_factors)
        compressed_string_factors = FactorUtils.factors_to_string(factors)
        return compressed_string_factors
github catboost / catboost / catboost / python-package / catboost / eval / factor_utils.py View on Github external
def factors_to_ranges_string(factors_set):
        if factors_set is None or len(factors_set) == 0:
            return "None"
        grouped_factors = FactorUtils.group_factors_by_range(factors_set)

        return ';'.join([FactorUtils.single_range_to_string(min(x), max(x)) for x in grouped_factors])