{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/LightGBM/issues/146","repository_url":"https://api.github.com/repos/Microsoft/LightGBM","labels_url":"https://api.github.com/repos/Microsoft/LightGBM/issues/146/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/LightGBM/issues/146/comments","events_url":"https://api.github.com/repos/Microsoft/LightGBM/issues/146/events","html_url":"https://github.com/Microsoft/LightGBM/issues/146","id":197833481,"number":146,"title":"[example] parameter grid search with scikit-api and categorical features, how?","user":{"login":"dancaspi","id":5417527,"avatar_url":"https://avatars.githubusercontent.com/u/5417527?v=3","gravatar_id":"","url":"https://api.github.com/users/dancaspi","html_url":"https://github.com/dancaspi","followers_url":"https://api.github.com/users/dancaspi/followers","following_url":"https://api.github.com/users/dancaspi/following{/other_user}","gists_url":"https://api.github.com/users/dancaspi/gists{/gist_id}","starred_url":"https://api.github.com/users/dancaspi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dancaspi/subscriptions","organizations_url":"https://api.github.com/users/dancaspi/orgs","repos_url":"https://api.github.com/users/dancaspi/repos","events_url":"https://api.github.com/users/dancaspi/events{/privacy}","received_events_url":"https://api.github.com/users/dancaspi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-28T10:47:14Z","updated_at":"2016-12-28T11:14:19Z","closed_at":"2016-12-28T11:14:19Z","body":"Hey,\r\nI am trying to tune parameters with RandomizedSearchCV and lightgbm\r\nwhere exactly do i place the categorical_feature param?\r\n\r\n\r\n\r\n```\r\nestimator = lgb.LGBMClassifier(nthread=3,silent=False)#,categorical_feature=[list(X_train).index(catFeature) for catFeature in categorical_features])\r\n\r\nparam_grid = {\r\n    'learning_rate': [0.01, 0.05,0.02, 0.03,0.04],\r\n    'n_estimators': [200,300,400,500,600],\r\n    'num_leaves': [8],\r\n    #'max_depth': [3,4],\r\n    'boosting_type' : ['gbdt'],\r\n    'objective' : ['binary'],\r\n    'seed' : [777],\r\n    'colsample_bytree' : [0.7,0.8,0.9,1],\r\n    'subsample' : [0.7,0.8,0.9,1],\r\n    'reg_alpha' : [0,0.1,0.5,1],\r\n    'reg_lambda' : [0,1,2,5,6,7,9,10],\r\n    'is_unbalance' : [True,False],\r\n}\r\n\r\nngrid=2\r\ngbm = RandomizedSearchCV(estimator, param_distributions=param_grid,\r\n                                   n_iter=ngrid,cv=5,scoring='roc_auc')\r\n\r\ngbm.fit(X_train, y_train)\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/LightGBM/issues/comments/269463209","html_url":"https://github.com/Microsoft/LightGBM/issues/146#issuecomment-269463209","issue_url":"https://api.github.com/repos/Microsoft/LightGBM/issues/146","id":269463209,"user":{"login":"dancaspi","id":5417527,"avatar_url":"https://avatars.githubusercontent.com/u/5417527?v=3","gravatar_id":"","url":"https://api.github.com/users/dancaspi","html_url":"https://github.com/dancaspi","followers_url":"https://api.github.com/users/dancaspi/followers","following_url":"https://api.github.com/users/dancaspi/following{/other_user}","gists_url":"https://api.github.com/users/dancaspi/gists{/gist_id}","starred_url":"https://api.github.com/users/dancaspi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dancaspi/subscriptions","organizations_url":"https://api.github.com/users/dancaspi/orgs","repos_url":"https://api.github.com/users/dancaspi/repos","events_url":"https://api.github.com/users/dancaspi/events{/privacy}","received_events_url":"https://api.github.com/users/dancaspi/received_events","type":"User","site_admin":false},"created_at":"2016-12-28T11:14:19Z","updated_at":"2016-12-28T11:14:19Z","body":"thanks, much appreciated. "}}
{"actor":{"display_login":"dancaspi"}}