calculate confidence value and entropy preprocess