Cross validation for model parameter selection