{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/LightGBM/issues/1275","repository_url":"https://api.github.com/repos/Microsoft/LightGBM","labels_url":"https://api.github.com/repos/Microsoft/LightGBM/issues/1275/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/LightGBM/issues/1275/comments","events_url":"https://api.github.com/repos/Microsoft/LightGBM/issues/1275/events","html_url":"https://github.com/Microsoft/LightGBM/issues/1275","id":306906338,"number":1275,"title":"R lightgbm can not use two valids in version 0.1","user":{"login":"hutaohutc","id":12443607,"avatar_url":"https://avatars1.githubusercontent.com/u/12443607?v=4","gravatar_id":"","url":"https://api.github.com/users/hutaohutc","html_url":"https://github.com/hutaohutc","followers_url":"https://api.github.com/users/hutaohutc/followers","following_url":"https://api.github.com/users/hutaohutc/following{/other_user}","gists_url":"https://api.github.com/users/hutaohutc/gists{/gist_id}","starred_url":"https://api.github.com/users/hutaohutc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hutaohutc/subscriptions","organizations_url":"https://api.github.com/users/hutaohutc/orgs","repos_url":"https://api.github.com/users/hutaohutc/repos","events_url":"https://api.github.com/users/hutaohutc/events{/privacy}","received_events_url":"https://api.github.com/users/hutaohutc/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-20T15:05:50Z","updated_at":"2018-03-20T15:56:03Z","closed_at":"2018-03-20T15:56:03Z","author_association":"NONE","body":"When i use code in https://github.com/Microsoft/LightGBM/blob/master/R-package/demo/basic_walkthrough.R\r\nmake error \r\n```\r\nError in lgb.call(\"LGBM_DatasetCreateFromCSC_R\", ret = handle, private$raw_data@p,  : \r\n  api error: len of label is not same with #data\r\n```\r\n\r\n```\r\ndata(agaricus.train, package = \"lightgbm\")\r\ndata(agaricus.test, package = \"lightgbm\")\r\ntrain <- agaricus.train\r\ntest <- agaricus.test\r\ndtrain <- lgb.Dataset(data = train$data, label = train$label, free_raw_data = FALSE)\r\ndtest <- lgb.Dataset(data = test$data, label = test$label, free_raw_data = FALSE)\r\n\r\n#--------------------Using validation set-------------------------\r\n# valids is a list of lgb.Dataset, each of them is tagged with name\r\nvalids <- list(train = dtrain, test = dtest)\r\n\r\n# To train with valids, use lgb.train, which contains more advanced features\r\n# valids allows us to monitor the evaluation result on all data in the list\r\nprint(\"Train lightgbm using lgb.train with valids\")\r\nbst <- lgb.train(data = dtrain,\r\n                 num_leaves = 4,\r\n                 learning_rate = 1,\r\n                 nrounds = 2,\r\n                 valids = valids,\r\n                 nthread = 2,\r\n                 objective = \"binary\")\r\n```"}}
{"actor":{"display_login":"hutaohutc"}}