Energy-efficient information inference in wireless sensor networks based on graphical modeling