An Optimization-Based Framework for Nonlinear Model Selection and Identification