Predicting Probabilities for GBM with caret library

前端 未结 3 1835
谎友^
谎友^ 2020-12-10 17:44

A similar question was asked however the link in the answer points to random forest example, it doesn\'t seem to work in my case.

Here is an example what I\'m trying

3条回答
  •  我在风中等你
    2020-12-10 18:32

    It's the key:

    I get a binary vector of predictions, which is good:

    [1] 0 1 0 0 1 0 0 0 0 0 0 0 1 1 0 0 1 1 1 0 0 0 1 ...

    Your factor labels could be interpret as numeric. I don't know why, but if you change 0 on 'a' and 1 on 'b' for instance, it will work without errors.

提交回复
热议问题