Modeling and Learning for LaCasa , the Location And Context-Aware Safety Assistant