Local optimal metrics and nonlinear modeling of chaotic time series.