There are three types of accounting for fairness in machine learning:
1- Pre-processing approaches, e.g. "Data preprocessing techniques for classification without discrimination" by Kamiran et al. 2012.
2- In-processing approaches, e.g. "A Convex Framework for Fair Regression" by Berk et al. 2017.
3- Post-processing approaches, e.g. "Equality of Opportunity in Supervised Learning" by Hardt et al. 2016.
To read about Fairness in Machine learning you can refer to FATML conference page and papers.
Here a MATLAB module for fair regression learning is provided which is a in-processing approach and uses the fairness penalty concept in the paper by Berk et al. 2017.