Generally, scikit-learn avoids transforming input parameters to estimators in `__fit__`, so that they may be changed using `set_params`. Instead, it would be usual to do this validation and transformation in `fit()`.