Optimizing hidden Markov models for ocean feature detection