Question on Automated Tuning lecture

May I know does the fold_idx is always start at 0? Why the second line need to add +1 for the first one? I know +1 is needed as an incremental of 1 in the fold number during the for loop.

for fold_idx, estimator in enumerate(cv_results[“estimator”]):
print(f"Best parameter found on fold #{fold_idx + 1}")
print(f"{estimator.best_params_}")

Yes, the default starts at 0.

This may help:

PS: the +1 is not to increment the For loop.

2 Likes