I'm just starting out with using
sklearn for my own Machine Learning project and I'm using
sklearn's built-in "Diabetes" dataset.
While performing data exploration on the features, I noticed something a bit confusing to me about the
sex feature. Here's the hist plot:
Now there are 2 things I do understand here:
- The binary histogram makes sense, there are in this dataset 2 distinct 'sexes' of male and female.
- Them being numerical also makes sense, as it appears all features in this dataset have already been 'normalized'.
What I don't understand is why the values are the way they are? (See below for what the values are)
>>> from sklearn import datasets >>> diab_df = datasets.load_diabetes(as_frame=True) >>> features = diab_df['data'] >>> features.sex.unique() array([ 0.05068012, -0.04464164])
How are these numbers derived? At first, I thought it could be some sort of stratified sampling, where if the true population distribution is say, 53% male, 47% female, then I'd maybe expect to see the values in this hist to be -0.47 & 0.53 or something?