title: How to tune parameter max_bin in lightgbm?
body: <p>I ran a basic example of lightgbm to test how max_bin affect the model:</p>
  
  <pre><code>require(lightgbm)
  data(agaricus.train, package = "lightgbm")
  data(agaricus.test, package = "lightgbm")
  train &lt;- agaricus.train
  test &lt;- agaricus.test
  
  dtrain &lt;- lgb.Dataset(data = train$data, label = train$label, free_raw_data = FALSE)
  dtest &lt;- lgb.Dataset(data = test$data, label = test$label, free_raw_data = FALSE)
  
  valids &lt;- list(train = dtrain, test = dtest)
  
  set.seed(100)
  bst &lt;- lgb.train(data = dtrain,
               num_leaves = 31,
               learning_rate = 0.05,
               nrounds = 20,
               valids = valids,
               nthread = 2,
               max_bin = 32,
               objective = "binary")
  </code></pre>
  
  <p>I tried setting max_bin to 32 and 255, the two tests give the same outputs:</p>
  
  <pre><code>[LightGBM] [Info] Number of positive: 3140, number of negative: 3373
  [LightGBM] [Info] Total Bins 128
  [LightGBM] [Info] Number of data: 6513, number of used features: 107
  [LightGBM] [Warning] No further splits with positive gain, best gain: -inf
  [1]:    train's binary_logloss:0.644852 test's binary_logloss:0.644853 
   ......
  [20]:   train's binary_logloss:0.204922 test's binary_logloss:0.204929 
  </code></pre>
  
  <p>Why does the max_bin have no effect on model's training?</p>