Entropy and coefficient matrix added. Still coefficient calculation
needs to be fixed.