Fixed bugs in HyperParamInferencer

Added check_c, check_d, invalidLog functions.
- check_c and check_d are put to handle some special
cases where c becomes too large or d becomes 0 or 1.