An Internet of Things infrastructure for gait characterization in assisted living environments and its application in the discovery of associations between frailty and cognition.