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 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')
X = enc_dat.fit_transform(data.df_devices).values
# label the datapoints with the corresponding activity
y = LabelEncoder(X).fit_transform(data.df_activities)
# from here on do all the other fancy machine learning stuff you already know
from sklearn import SVM
SVM().fit(X).score(X,y)
...
_For more examples and usage, please refer to the Documentation or Notebooks _
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
- Casas Aruba (2011)
- Casas Milan (2009)
- Kasteren House A,B,C
- MitLab
- Tuebingen 2019
- UCI Adl Binary
Models
iid data
- SVM
- winnow algorithm
- Naive bayes
- Decision Trees
sequential discretized
- RNNs
- LSTMs
- HMMs
- TCNs
images
- CNN
- Transformer
temporal points
- THP
Replication list
Here are papers I plan to replicate
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
- Todo buy me a coffee batch
Sources
- Datasets
[1]:
[2]: 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. - TODO cite every dataset
- TODO cite every algorithm package that is used
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
pyadlml-0.0.3a0.tar.gz
(88.8 kB
view hashes)
Built Distribution
pyadlml-0.0.3a0-py3-none-any.whl
(139.7 kB
view hashes)
Close
Hashes for pyadlml-0.0.3a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 344f59982877b5cbb0ee95f6717e286495310c7893d2c29312f54d04bd5d9551 |
|
MD5 | aea0849382c8ef3852420d8f72023e95 |
|
BLAKE2b-256 | c75d473ea92347fdb570e258d7353e4d46a88175b12bbee46187c74f7848728e |