Correlation between optical absorption redshift and carrier density in phase change materials