Categorical encoded variables in scikit-learn diabetes dataset When using sklearn.datasets import load_diabetes, the sex variable which is categorical, is scaled to continuous values. Is it even legal to scale such variables?
Yes, it is perfectly legal to do so. Scaling such binary variables does not change the shape of its histogram and the shape is all that matters to most models.