What\'s the most elegant way to check whether an sklearn model has been fitted? i.e. whether its fit() function has been called after it was instantiated, or not. <
fit()
I do this for classifiers:
def check_fitted(clf): return hasattr(clf, "classes_")