Sklearn like library supporting numerous Activity of Daily Livings datasets
Project description
Activities of Daily Living - Machine Learning
Contains data preprocessing and visualization methods for ADL datasets.
Last Stable Release
$ pip install pyadlml
Latest Development Changes
$ git clone https://github.com/tcsvn/pyadlml
$ cd pyadlml
Usage example
From a jupyter notebook run
from pyadlml.dataset import fetch_amsterdam
# Fetch dataset
data = fetch_amsterdam(cache=True)
# plot the persons activity density distribution over one day
from pyadlml.dataset.plot.activities import ridge_line
ridge_line(data.df_activities)
# plot the signal cross correlation between devices
from pyadlml.dataset.plot.devices import heatmap_cross_correlation
heatmap_cross_correlation(data.df_devices)
# create a raw representation with 20 second timeslices
from pyadlml.preprocessing import DiscreteEncoder, LabelEncoder
enc_dat = DiscreteEncoder(rep='raw', t_res='20s')
raw = enc_dat.fit_transform(data.df_devices)
# label the datapoints with the corresponding activity
lbls = LabelEncoder(raw).fit_transform(data.df_activities)
X = raw.values
y = lbls.values
# from here on do all the other fancy machine learning stuff you already know
from sklearn import svm
clf = svm.SVC()
clf.fit(X, y)
...
For more examples and and how to use, please refer to the documentation
Features
- 8 Datasets
- A bunch of plots visualizing devices, activities and their interaction
- Different data representations
- Discrete timeseries
- raw
- changepoint
- lastfired
- Timeseries as images
- Discrete timeseries
- Methods for importing data from Home Assistant/Activity Assistant
Supported Datasets
- Amsterdam [1]
- Aras [2]
- Casas Aruba (2011) [3]
- Casas Milan (2009) [4]
- Kasteren House A,B,C [5]
- MitLab [6]
- Tuebingen 2019 [7]
- UCI Adl Binary [8]
Replication list
Here are papers I plan to replicate (TODO)
Contributing
- Fork it (https://github.com/tcsvn/pyadlml/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
Related projects
- activity-assistant - Recording, predicting ADLs within Home assistant.
Support
How to cite
If you are using pyadlml for puplications consider citing the package
@software{activity-assistant,
author = {Christian Meier},
title = {pyadlml},
url = {https://github.com/tcsvn/pyadlml},
version = {0.0.1-alpha},
date = {2020-12-12}
}
Sources
[1]: T.L.M. van Kasteren; A. K. Noulas; G. Englebienne and B.J.A. Kroese, Tenth International Conference on Ubiquitous Computing 2008
[2]: H. Alemdar, H. Ertan, O.D. Incel, C. Ersoy, ARAS Human Activity Datasets in Multiple Homes with Multiple Residents, Pervasive Health, Venice, May 2013.
[3,4]: WSU CASAS smart home project: D. Cook. Learning setting-generalized activity models for smart spaces. IEEE Intelligent Systems, 2011.
[5]: TODO include
[6]: E. Munguia Tapia. Activity Recognition in the Home Setting Using Simple and Ubiquitous sensors. S.M Thesis
[7]: Me :)
[8]: Ordonez, F.J.; de Toledo, P.; Sanchis, A. Activity Recognition Using Hybrid Generative/Discriminative Models on Home Environments Using Binary Sensors. Sensors 2013, 13, 5460-5477.
License
MIT © tcsvn
sdf
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyadlml-0.0.6.9.2a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 942c4ddd907ac53149f7e87979f8310d716a711e63f9bdcb7fd6dcd15c15ce29 |
|
MD5 | 1c622caac7e3bb52392d31b76bf81f97 |
|
BLAKE2b-256 | 0afbdbfdef114cff41411b309f2a11463e62710b531a2796358b39e7e767ad34 |