lamho86 / phylolm

GNU General Public License v2.0
30 stars 12 forks source link

'Both' model selection gives worse results than 'forward'? #52

Closed rvosa closed 1 year ago

rvosa commented 2 years ago

Hi,

I really ought to be able to answer this question myself because I drafted the first version of phyloglmstep(), which @lamho86 then tweaked, but I'm getting results I can't yet explain. On a particular data set forward model selection is giving me pretty consistently better results than 'both'. Am I wrong in being surprised about this? I figured 'both' should be less likely to get trapped in local optima?

Rutger

lamho86 commented 2 years ago

Hi,

I am not surprised that forward selection can select a better model than stepwise. I don't think it happens often but it does happen sometimes. For example, if forward selection leads to a correct path to the best model, stepwise may be trapped in local optima by trying several other directions.

rvosa commented 2 years ago

I guess so, right? I will look more closely into which ones the 'both' is getting stuck in to see if I can make it make sense. Anyway, go ahead and close this ticket. All the best!