Similar question: What's the advantage of a trailing underscore in Python naming?. This addresses advantages/disadvantages, whereas this addresses the reasoning behind doing it, both broadly and specifically to sklearn.
I am looking through the sklearn documentation, and I noticed that the sklearn.model_selection.GridSearchCV attributes all end in underscore. For example:
- cv_results_
- best_params_
- best_score_
Why is this? What does the underscore do? Please be as broad as possible in your answer (i.e. don't just refer to sklearn's GridSearchCV.
I'm assuming this isn't just an sklearn thing, and I have no idea what the appropriate tag is for this so I'm tagging sklearn. Please correct the tags (or me!).
sklearn
.