Is it possible to normalize features by one specific feature? 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 genes of longer lengths they are more likely to have more data only due to their gene size and not due to them truly being more causal to the disease. This is problematic as when I condense data by taking the most significant data point per gene the longer genes will be biased due to their length (having more data points to choose from in order to have the 1 value per gene for each feature).
I am looking to regulate all my features by gene length, however I am not sure how to do this. By using xgboost I cannot normalize my features as tree-based models are invariant to monotone transformations.
Are there any methods of regulating/normalizing features by another specific feature? I have also tried just including gene length as a feature for the ML model to use itself but this is a difficult blackbox to interpret if the model is truly considering gene length correlations with other features as it should.
edit:
If I were to simply do normalization of gene length such as:
genetic_feature_column_normalised = genetic_feature_column / gene_length_column
Doing this so I normalise each gene's features row by row by each gene's gene length - would that be problematic at all? If this is acceptable would it mean I should or shouldn't include gene length as a feature - as maybe this normalisation could be just a preprocessing step only?
 A: It is difficult to answer your question without knowing more about the specific type of data you have and the nature of the process you're trying to model.  There may, however, be some ways to think about the problem that might help you decide.
It is very common to see data normalized by gene length.  For example,  when considering the melting temperature for DNA or RNA dimers, often the percentage GC is used, along with other information.  This makes sense from the perspective of the process being modeled, sp. annealing.  A longer molecule may have many more instances of GC, but if it has a very low percentage of GC, then it will have a lower melting temperature than a similarly sized molecule with higher GC content.  In this case, both the number of GC pairs and the fraction of GC per length are going to be important.
Alternatively, if you're looking at a small molecule's interaction with a gene coding region, the number of interaction sites may be important.  Consider an intercalating compound that disrupts transcription of the gene of interest.  One interaction may not be enough to cause large disruptions, but 10 interaction sites may prevent transcription completely.  This could be even further complicated by the length of exons, the number of exons, number of introns and their lengths, etc., and whether the small molecule interacts as well at exonic or intronic regions.
Thinking about proteins, it may not matter how big an enzyme is, but if a small molecule of arbitrary size can interact at the catalytic site of that enzyme, all activity may be stopped regardless of how big the protein is.
Your suggestion of normalizing by gene length is not a bad suggestion, but whether you do so or not is very much dictated by the nature of the process under study.  Careful consideration of that process and how you expect it to operate at a molecular level will guide you in making that decision.
