Skip to content

Commit

Permalink
Changed name to hsmm4acc
Browse files Browse the repository at this point in the history
  • Loading branch information
dafnevk committed Aug 7, 2017
1 parent f25f270 commit 5685497
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 35 deletions.
6 changes: 0 additions & 6 deletions NOTICE

This file was deleted.

21 changes: 3 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# UK Movement Sensing
This repository is for the project by NLeSC in collaboration with UCL, of analyzing movement sensor data of adolescents. It contains code for processing accelerometer data using Hidden Semi Markov models (using the [pyhsmm](https://github.com/mattjj/pyhsmm) package). This software is build for the [Millenium Cohort study](http://www.cls.ioe.ac.uk/page.aspx?sitesectionid=851).
# HSMMs for accelerometer data
This repository is for the project by NLeSC in collaboration with UCL, of analyzing movement sensor data of adolescents. It contains code for processing accelerometer data using Hidden Semi Markov models (using the [pyhsmm](https://github.com/mattjj/pyhsmm) package).
This software is meant for accelerometer data processed with the [R-package GGIR](https://github.com/wadpac/GGIR).

## Installation
Prerequisites:
Expand Down Expand Up @@ -44,20 +45,4 @@ To run tests:

`nosetests test/`

In order to run the 3-d visualizations (in [this notebook](https://github.com/NLeSC/UKMovementSensing/blob/master/notebooks/workflow/3_Visualization.ipynb) ) you need to install [mayavi](http://docs.enthought.com/mayavi/mayavi/installation.html).

## Running the workflow
For processing data of the Millenium Cohort studies, we created a flow of [Jupyter notebooks](http://jupyter.org) that can be found in the [notebooks/workflow directory](https://github.com/NLeSC/UKMovementSensing/tree/master/notebooks/workflow).
Input for this workflow is:
* accelerometer data that is processed completely with the R-package GGIR into 5-second aggregated data
* A file for diary annotations, and wearcode file for joining the datasets
Edit the `config.py` file to specify the directories for input and output. Also specific settings for the HSMM can be set in this file.

The workflow consists of the following steps:
* **0.Prepare data** Joins the accelerometer with the diary data and performs some basic checks.
* **1.HSMM** Fits an HSMM model on the data and saves the data with the corresponding states for each time window
* **1b.HSMM batches** If the dataset is very large, this notebook can be used to process the data in batches
* **2.Analyze results** Makes comparison with diary and gives some statistics, to aid interpretation of the states
* **3.Visualize Model** Creates a 3d visualization of the states

The output from step 1 (the data with corresponding states) can be used for further processing, such as aggregating per individual.
4 changes: 2 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# UKMovementSensing documentation build configuration file, created by
# hsmm4acc documentation build configuration file, created by
# sphinx-quickstart on Tue Mar 29 15:46:32 2016.
#
# This file is execfile()d with the current directory set to its
Expand Down Expand Up @@ -48,7 +48,7 @@
master_doc = 'index'

# General information about the project.
project = u'UKMovementSensing'
project = u'hsmm4acc'
copyright = u'2016, Netherlands eScience Center'
author = u'Dafne van Kuppevelt'

Expand Down
4 changes: 2 additions & 2 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.. UKMovementSensing documentation master file, created by
.. hsmm4acc documentation master file, created by
sphinx-quickstart on Tue Mar 29 15:46:32 2016.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
The kernel_tuner documentation
The hsmm4acc documentation
==============================

Contents:
Expand Down
3 changes: 1 addition & 2 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ucl
name: hsmm
channels:
- defaults
dependencies:
Expand Down Expand Up @@ -52,5 +52,4 @@ dependencies:
- future==0.16.0
- pybasicbayes==0.2.2
- pyhsmm==0.1.6
prefix: /data/anaconda/anaconda3/envs/ucl

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ def read(fname):
required = f.read().splitlines()

setup(
name = "UKMovementSensing",
name = "hsmm4acc",
version = "0.0.1",
description = ("Behaviour detection in wearable movement sensor data"),
license = "Apache 2.0",
keywords = "Python",
url = "https://github.com/NLeSC/UKMovementSensing",
packages=['UKMovementSensing'],
url = "https://github.com/wadpac/hsmm4acc",
packages=['hsmm4acc'],
install_requires=required,
long_description=read('README.md'),
classifiers=[
Expand Down
2 changes: 1 addition & 1 deletion test/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
import sys
sys.path.insert(0, os.path.abspath('..'))

import UKMovementSensing
import hsmm4acc
2 changes: 1 addition & 1 deletion test/test_hsmm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import UKMovementSensing.hsmm as hsmm
import hsmm4acc.hsmm as hsmm
import numpy as np


Expand Down

0 comments on commit 5685497

Please sign in to comment.