I have a dataset of genes with features that describe the genes at different scales (epigenetic, protein, cell, drug data etc. all numeric data). I use this dataset in supervised ML with a xgboost regression model scoring the genes between 0 to 1 (with 1 being most likely to cause a disease and 0 being least likely).
However, for my data collection, I collect data such as the number of epigenetic sites per gene. Features like this are affected by the length of the gene and this will maybe skew prediction (e.g. genes which are larger will have more hits/sites potentially tricking the model into thinking they are more likely disease-causing genes only due to their bigger size).
To address this I give the model gene length as a feature, hoping it will control for any positive correlation with gene length. However, I'm having blackbox issues proving this is what's happening, I use SHAP and Friedman's H-statistic to show how gene length interacts with other features but these 2 have conflicting results.
I am looking to see if there is some other way I can use gene length to regulate the other features, whether as a pre-processing step before or still as a feature in the model itself. I have a biology background and I'm teaching myself stats/ML, so I'm not sure if this is possible - but is there a way to use a feature as a covariate or mediator of other features?