AI4M Course 2 Week4 RandomForest model performing worse than Cox


All my unit tests passed, but when I ran the last a few cells to compare random forest model against the Cox model, it looks like random forest is performing slightly worse, which is the opposite of what to expect based on description (screenshot attached).

I didn’t modify any parameters of random forest model

model = forest.rfsrc(ro.Formula('Surv(time, status) ~ .'), data=df_train, ntree=300, nodedepth=5, seed=-1)
                         Sample size: 154
                    Number of deaths: 64
                     Number of trees: 300
           Forest terminal node size: 15
       Average no. of terminal nodes: 6.54
No. of variables tried at each split: 5
              Total no. of variables: 17
       Resampling used to grow trees: swor
    Resample size used to grow trees: 97
                            Analysis: RSF
                              Family: surv
                      Splitting rule: logrank *random*
       Number of random split points: 10
                          Error rate: 19.07%

Could anyone clarify this why? Thanks


Hi @MrHuanwang,

Do you need help with this still ?