{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/LightGBM/issues/674","repository_url":"https://api.github.com/repos/Microsoft/LightGBM","labels_url":"https://api.github.com/repos/Microsoft/LightGBM/issues/674/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/LightGBM/issues/674/comments","events_url":"https://api.github.com/repos/Microsoft/LightGBM/issues/674/events","html_url":"https://github.com/Microsoft/LightGBM/issues/674","id":240825724,"number":674,"title":"[R package] Confusion of \"pred2 should be identical to pred\"","user":{"login":"zheguzai100","id":7357088,"avatar_url":"https://avatars2.githubusercontent.com/u/7357088?v=3","gravatar_id":"","url":"https://api.github.com/users/zheguzai100","html_url":"https://github.com/zheguzai100","followers_url":"https://api.github.com/users/zheguzai100/followers","following_url":"https://api.github.com/users/zheguzai100/following{/other_user}","gists_url":"https://api.github.com/users/zheguzai100/gists{/gist_id}","starred_url":"https://api.github.com/users/zheguzai100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zheguzai100/subscriptions","organizations_url":"https://api.github.com/users/zheguzai100/orgs","repos_url":"https://api.github.com/users/zheguzai100/repos","events_url":"https://api.github.com/users/zheguzai100/events{/privacy}","received_events_url":"https://api.github.com/users/zheguzai100/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-07-06T02:15:50Z","updated_at":"2017-07-06T07:44:09Z","closed_at":"2017-07-06T02:55:42Z","body":"@henry0312 \r\n@guolinke\r\nrunning `basic_walkthrough.R`\r\n`sum(abs(pred2-pred))= 2.00211185941354`\r\nin my mind, 'be identical to' means 0, or at least infinitily be close to 0, why 2.002\r\nand how to judge a value whether means 'idnetical to each other'\r\n\r\n##### -------------------------------\r\n`require(lightgbm)`\r\n`require(methods)`\r\n`require(Matrix)`\r\n#### We load in the agaricus dataset\r\n#### In this example, we are aiming to predict whether a mushroom is edible\r\n`data(agaricus.train, package = \"lightgbm\")`\r\n`data(agaricus.test, package = \"lightgbm\")`\r\n`train <- agaricus.train`\r\n`test <- agaricus.test`\r\n`bst <- lightgbm(data = train$data,\r\n                label = train$label,\r\n                num_leaves = 4,\r\n                learning_rate = 1,\r\n                nrounds = 2,\r\n                objective = \"binary\")`\r\n`pred <- predict(bst, test$data)`\r\n`err <- mean(as.numeric(pred > 0.5) != test$label)`\r\n`print(paste(\"test-error=\", err))`\r\n`lgb.save(bst, \"I:/rwork/lightGBM/lightgbm.model\")`\r\n#### Load binary model to R\r\n`bst2 <- lgb.load(\"I:/rwork/lightGBM/lightgbm.model\")`\r\n`pred2 <- predict(bst2, test$data)`\r\n#### pred2 should be identical to pred\r\n`print(paste(\"sum(abs(pred2-pred))=\", sum(abs(pred2 - pred))))`\r\n#### [1] \"sum(abs(pred2-pred))= 2.00211185941354\""},"comment":{"url":"https://api.github.com/repos/Microsoft/LightGBM/issues/comments/313321627","html_url":"https://github.com/Microsoft/LightGBM/issues/674#issuecomment-313321627","issue_url":"https://api.github.com/repos/Microsoft/LightGBM/issues/674","id":313321627,"user":{"login":"zheguzai100","id":7357088,"avatar_url":"https://avatars2.githubusercontent.com/u/7357088?v=3","gravatar_id":"","url":"https://api.github.com/users/zheguzai100","html_url":"https://github.com/zheguzai100","followers_url":"https://api.github.com/users/zheguzai100/followers","following_url":"https://api.github.com/users/zheguzai100/following{/other_user}","gists_url":"https://api.github.com/users/zheguzai100/gists{/gist_id}","starred_url":"https://api.github.com/users/zheguzai100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zheguzai100/subscriptions","organizations_url":"https://api.github.com/users/zheguzai100/orgs","repos_url":"https://api.github.com/users/zheguzai100/repos","events_url":"https://api.github.com/users/zheguzai100/events{/privacy}","received_events_url":"https://api.github.com/users/zheguzai100/received_events","type":"User","site_admin":false},"created_at":"2017-07-06T07:44:09Z","updated_at":"2017-07-06T07:44:09Z","body":"@guolinke \r\ndemo of boost_from_prediction:\r\n`param <- list(num_leaves = 4,\r\n              learning_rate = 1,\r\n              nthread = 2,\r\n              silent = 1,\r\n              objective = \"binary\")`\r\n`bst <- lgb.train(params=param, data=dtrain,\r\n                 nrounds = 1, valids = valids)`\r\n#### [LightGBM] [Fatal] Unknown parameter: silent\r\n#### Error in lgb.call(\"LGBM_DatasetCreateFromCSC_R\", ret = handle, private$raw_data@p,  : \r\n ####  api error: Unknown parameter: silent\r\n\r\n\r\n`silent=1` means `verbose = 0` ? "}}
{"actor":{"display_login":"zheguzai100"}}