Nowadays, close monitoring of daily activities of elders is enabled by employment of the advanced wireless sensor networks, whose large quantity data are then analyzed by activity recognition techniques whereby their behavior patterns can be accurately modelled. In general, behavior patterns are important information about how elders live, and caregivers can thus take care of elders easily with the help from that informaiton. So far, there are many research results related to learning of human behavior; however, their assumptions are usually either too simple or inflexible to account for complex human behaviors in real life, which change dynamically depending on contexts. We here present a context-aware framework for human behavior learning and prediction. Such framework discovers contexts from resident's real life data and adapts correspoinding behavior patterns next accordingly. We evaluate the framework on two public datasets, and the experimental results show promising results.