Assessing temporal relationships between events in smart environments