The largest eigenvalue of caterpillars