{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/LightGBM/issues/622","repository_url":"https://api.github.com/repos/Microsoft/LightGBM","labels_url":"https://api.github.com/repos/Microsoft/LightGBM/issues/622/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/LightGBM/issues/622/comments","events_url":"https://api.github.com/repos/Microsoft/LightGBM/issues/622/events","html_url":"https://github.com/Microsoft/LightGBM/issues/622","id":236214254,"number":622,"title":"Python only single feature number of used features: 0 [LightGBM] [Info] No further splits with positive gain, best gain: -infTrained a tree with leaves=1 and max_depth=1","user":{"login":"lai-bluejay","id":11958187,"avatar_url":"https://avatars1.githubusercontent.com/u/11958187?v=3","gravatar_id":"","url":"https://api.github.com/users/lai-bluejay","html_url":"https://github.com/lai-bluejay","followers_url":"https://api.github.com/users/lai-bluejay/followers","following_url":"https://api.github.com/users/lai-bluejay/following{/other_user}","gists_url":"https://api.github.com/users/lai-bluejay/gists{/gist_id}","starred_url":"https://api.github.com/users/lai-bluejay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lai-bluejay/subscriptions","organizations_url":"https://api.github.com/users/lai-bluejay/orgs","repos_url":"https://api.github.com/users/lai-bluejay/repos","events_url":"https://api.github.com/users/lai-bluejay/events{/privacy}","received_events_url":"https://api.github.com/users/lai-bluejay/received_events","type":"User","site_admin":false},"labels":[{"id":493507776,"url":"https://api.github.com/repos/Microsoft/LightGBM/labels/awaiting-response","name":"awaiting-response","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-06-15T14:40:44Z","updated_at":"2017-06-16T13:45:01Z","closed_at":null,"body":"i want to use gbdt to bin my single feature. one of the feature has exception.\r\nlight gbm told me that  \r\n\r\n```shell\r\n[LightGBM] [Info] Number of positive: 24149, number of negative: 106400\r\n[LightGBM] [Info] Total Bins 0\r\n[LightGBM] [Info] Number of data: 130549, number of used features: 0\r\n[LightGBM] [Info] No further splits with positive gain, best gain: -inf\r\n[LightGBM] [Info] Trained a tree with leaves=1 and max_depth=1\r\n[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split \r\n```\r\n\r\n\r\nthe feature vector shape:(130549, 1), max  8.0,  min  1.0\r\nother params are \r\n```python\r\n        num_leaves = 9\r\n        ins_len = len(feature)\r\n        min_data_in_leaf = int(ins_len / num_leaves / 3)\r\n        # TODO  min_sum_hessian_in_leaf\r\n        bt = \"gbdt\"\r\n        lgb_params = {\r\n            'learning_rate': 1.0,\r\n            'booster': bt,\r\n            'objective': 'binary',\r\n            'eval_metric': ['auc', 'logloss'],\r\n            'nthread': 12,\r\n            'num_trees': 1,\r\n            'min_data_in_leaf': min_data_in_leaf,\r\n            'tree_method': 'hist',\r\n            'num_leaves': num_leaves,\r\n            'max_bins': 1024,\r\n        }\r\n```\r\n\r\nis there other important params that i didn't set wright?\r\nor where can i check the histogram method? Because lightgbm only have total 0 bins.\r\n\r\n## Environment info\r\nOperating System: linux\r\nCPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz  cores  16\r\nC++/Python/R version: python 2.7.13\r\n\r\n## Error Message:\r\n```shell\r\n[LightGBM] [Info] Number of positive: 24149, number of negative: 106400\r\n[LightGBM] [Info] Total Bins 0\r\n[LightGBM] [Info] Number of data: 130549, number of used features: 0\r\n[LightGBM] [Info] No further splits with positive gain, best gain: -inf\r\n[LightGBM] [Info] Trained a tree with leaves=1 and max_depth=1\r\n[LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements.\r\n[{u'num_leaves': 2, u'tree_index': 0, u'tree_structure': {u'internal_count': 130549, u'right_child': {u'leaf_value': 0.18498035220491924, u'leaf_index': 1, u'leaf_parent': 0, u'leaf_count': 130549}, u'split_feature': 0, u'internal_value': 0, u'threshold': 0, u'split_gain': 1, u'split_index': 0, u'decision_type': u'no_greater', u'left_child': {u'leaf_value': 0.18498035220491924, u'leaf_index': 0, u'leaf_parent': 0, u'leaf_count': 0}}, u'shrinkage': 1}]\r\nTraceback (most recent call last):\r\n  File \"monthly_iteration_conan.py\", line 199, in <module>\r\n    feature_vali=False)\r\n  File \"monthly_iteration_conan.py\", line 117, in train_model\r\n    iter_pipline.build()\r\n  File \"/data/home/laihongchang/projects/conan/app/../conan/engine/base.py\", line 271, in build\r\n    ins.build()\r\n  File \"/data/home/laihongchang/projects/conan/app/../conan/layers/auto_binning.py\", line 829, in build\r\n    (delete_list,bins_model_save) = self.single_autobinning(featuresmatrix,labelvector,featurename)\r\n  File \"/data/home/laihongchang/projects/conan/app/../conan/layers/auto_binning.py\", line 684, in single_autobinning\r\n    result_bins_box = auto_binning.binning()\r\n  File \"/data/home/laihongchang/projects/conan/app/../conan/layers/auto_binning.py\", line 526, in binning\r\n    init_bins_box = self.mapping_func()\r\n  File \"/data/home/laihongchang/projects/conan/app/../conan/layers/auto_binning.py\", line 446, in mapping_func\r\n    init_map = self.discrete_method_map[self.discrete_method_name](feature_value_list)\r\n  File \"/data/home/laihongchang/projects/conan/app/../conan/layers/auto_binning.py\", line 334, in discrete_method_lgbm_dt\r\n    tree_structure = tree_info[1]['tree_structure']\r\nIndexError: list index out of range\r\n```\r\n## Reproducible examples\r\n\r\n## Steps to reproduce\r\n\r\n1.\r\n2.\r\n3.\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/LightGBM/issues/comments/309029885","html_url":"https://github.com/Microsoft/LightGBM/issues/622#issuecomment-309029885","issue_url":"https://api.github.com/repos/Microsoft/LightGBM/issues/622","id":309029885,"user":{"login":"guolinke","id":16040950,"avatar_url":"https://avatars3.githubusercontent.com/u/16040950?v=3","gravatar_id":"","url":"https://api.github.com/users/guolinke","html_url":"https://github.com/guolinke","followers_url":"https://api.github.com/users/guolinke/followers","following_url":"https://api.github.com/users/guolinke/following{/other_user}","gists_url":"https://api.github.com/users/guolinke/gists{/gist_id}","starred_url":"https://api.github.com/users/guolinke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guolinke/subscriptions","organizations_url":"https://api.github.com/users/guolinke/orgs","repos_url":"https://api.github.com/users/guolinke/repos","events_url":"https://api.github.com/users/guolinke/events{/privacy}","received_events_url":"https://api.github.com/users/guolinke/received_events","type":"User","site_admin":false},"created_at":"2017-06-16T13:45:01Z","updated_at":"2017-06-16T13:45:01Z","body":"@lai-bluejay any updates ? "}}
{"actor":{"display_login":"guolinke"}}