<p>Kjetil and I have had a disagreement about whether <a href="https://stats.stackexchange.com/questions/263836/probability-for-class-in-xgboost">my answer here</a> should be a comment.</p>

<p>OP's question is essentially one of reading/finding documentation for how xgboost works.* </p>

<p>The full and complete answer to OP's question is that the user's guess is correct: the function works in the way that the user expected. I didn't write more because there's not anything more to say.</p>

<p>Kjetil's contention is that short answers should be comments <strong>even if it completely answers the question</strong>, citing the <a href="https://stats.meta.stackexchange.com/questions/4603/why-are-short-answers-considered-to-be-poor-quality-for-this-site">Michael Chernick</a> thread. (This is not a straw man argument - it's the content of the comment thread.) I do not believe that contents the Michael Chernick thread apply -- the core contention there is short answers tend to also be incomplete, unhelpful or confusing answers, which are frowned upon.</p>

<p>By contrast, my answer in this thread fully answers the user's question. It took a little digging, but I eventually found a source for the claim (which I knew to be true) that I make in my answer (a fact which may or may not change Kjetil's contention, since it occurred after the comment exchange, but it took a moment to find the relevant doc; regardless, the answer is true even without the doc).</p>

<p>For an example of a short answer which completely answers a question, and was modestly up-voted, see my answer at <a href="https://stats.stackexchange.com/questions/146373/closed-form-for-mathbbe-ln-1-p-for-p-sim-beta-alpha-beta/146376#146376">Closed form for $\mathbb{E}[\ln (1-p)]$, for $p \sim Beta(\alpha, \beta)$</a> which received no negative feedback, presumably because it completely answers the question.</p>

<p>* Whether that's on-topic is a different matter altogether, but I know from experience that finding xgboost documentation, and even more, documentation for a particular xgboost version, is a bit of a struggle, so I think it's worth providing an answer here.</p>
