Weighted cross validation in model selection