This projects is inspired by the Nest Learning Thermostat:
https://nest.com/ca/thermostat/saving-energy/
The algorithm here presented uses polynomial regression to learn your daily schedule and the temperatures You prefer for the different times of the day comparing the changes You make in the temperature of the house and when You make them.