Activities and abnormalities in activities are detected by: (1) receiving data corresponding to measurements of an activity occurring during a time interval; (2) determining a plurality of primitives associated with the data, wherein each of the plurality of primitives represents a characteristic pattern in a portion of the time interval; (3) derive an activity structure relating a first subset of the plurality of primitives that are correlated in time; and (4) based on the activity structure, classify a second subset of the plurality of primitives as an abnormal instance of the bodily activity.