def main(config="../../config.yaml", namespace=""): # obtain config if isinstance(config, str): config = load_job_config(config) backend = config.backend work_mode = config.work_mode param = { "name": "hetero_feature_binning_0", "method": "quantile", "compress_thres": 10000, "head_size": 10000, "error": 0.001, "bin_num": 10, "bin_indexes": -1, "bin_names": None, "category_indexes": None, "category_names": None, "adjustment_factor": 0.5, "local_only": False, "transform_param": { "transform_cols": [ 0, 1, 2 ], "transform_names": None, "transform_type": "woe" } } pipeline = common_tools.make_normal_dsl(config, namespace, param) pipeline.fit(backend=backend, work_mode=work_mode)
def main(config="../../config.yaml", namespace=""): # obtain config if isinstance(config, str): config = load_job_config(config) param = { "name": "hetero_feature_binning_0", "method": "quantile", "optimal_binning_param": { "metric_method": "iv", "min_bin_pct": 0.05, "max_bin_pct": 0.8, "init_bucket_method": "quantile", "init_bin_nums": 100, "mixture": True }, "compress_thres": 10000, "head_size": 10000, "error": 0.001, "bin_num": 10, "bin_indexes": -1, "bin_names": None, "category_indexes": [ 0 ], "category_names": None, "adjustment_factor": 0.5, "local_only": False, "transform_param": { "transform_cols": -1, "transform_names": None, "transform_type": "bin_num" } } pipeline = common_tools.make_normal_dsl(config, namespace, param) pipeline.fit()
def main(config="../../config.yaml", namespace=""): # obtain config if isinstance(config, str): config = load_job_config(config) param = { "name": "hetero_feature_binning_0", "method": "quantile", "compress_thres": 10000, "head_size": 10000, "error": 0.001, "bin_num": 100, "bin_indexes": -1, "bin_names": None, "category_indexes": None, "category_names": None, "adjustment_factor": 0.5, "local_only": False, "transform_param": { "transform_cols": -1, "transform_names": None, "transform_type": "bin_num" } } pipeline = common_tools.make_normal_dsl(config, namespace, param, dataset='default_credit') pipeline.fit()
def main(config="../../config.yaml", namespace=""): # obtain config if isinstance(config, str): config = load_job_config(config) backend = config.backend work_mode = config.work_mode param = { "name": "hetero_feature_binning_0", "method": "optimal", "optimal_binning_param": { "metric_method": "iv", "min_bin_pct": 0.05, "max_bin_pct": 0.8, "init_bucket_method": "quantile", "init_bin_nums": 100, "mixture": False }, "compress_thres": 10000, "head_size": 10000, "error": 0.001, "bin_num": 10, "bin_indexes": -1, "bin_names": None, "category_indexes": None, "category_names": None, "adjustment_factor": 0.5, "local_only": False, "transform_param": { "transform_cols": -1, "transform_names": None, "transform_type": "bin_num" } } pipeline = common_tools.make_normal_dsl(config, namespace, is_multi_host=True, bin_param=param, host_dense_output=False) job_parameters = JobParameters(backend=backend, work_mode=work_mode) pipeline.fit(job_parameters)
def main(config="../../config.yaml", namespace=""): # obtain config if isinstance(config, str): config = load_job_config(config) backend = config.backend work_mode = config.work_mode param = { "name": "hetero_feature_binning_0", "method": "optimal", "optimal_binning_param": { "metric_method": "iv", "min_bin_pct": 0.05, "max_bin_pct": 0.8, "init_bucket_method": "quantile", "init_bin_nums": 100, "mixture": True }, "compress_thres": 10000, "head_size": 10000, "error": 1e-05, "bin_num": 10, "bin_indexes": -1, "bin_names": None, "category_indexes": [3, 7], "category_names": ["x3", "x7"], "adjustment_factor": 0.5, "local_only": False, "transform_param": { "transform_cols": -1, "transform_names": None, "transform_type": "woe" } } pipeline = common_tools.make_normal_dsl(config, namespace, param, dataset='default_credit') pipeline.fit(backend=backend, work_mode=work_mode)