Sklearn like library supporting numerous Activity of Daily Livings datasets
Project description
Activity of Daily Living - Machine Learning
Contains data preprocessing and visualization methods for ADL datasets.
Activity of Daily livings (ADLs) e.g cooking, sleeping, and devices readings are recorded by smart homes inhabitants. The goal is to predict inhabitants activities using device readings. Pyadlml offers an easy way to fetch, visualize and preprocess common datasets. A further goal is to replicate prominent works in this domain.
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 activity density distribution for the person over one day
from pyadlml.dataset.plot.activities import ridge_line
ridge_line(data.df_activities)
# plot the signal cross correlation between the devices
from pyadlml.dataset.plot.devices import heatmap_cross_correlation
heatmap_cross_correlation(data.df_devices)
# create a raw representation with timeslices of 20 seconds
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)
# do all the other fancy machine learning stuff
from sklearn import SVM
SVM().fit(X).score(X,y)
...
_For more examples and usage, please refer to the Notebooks _
Features
- 8 Datasets to fetch
- A bunch of plots visualizing devices, activities and their interaction
- Different data representations
- Discrete timeseries
- raw
- changepoint
- lastfired
- Timeseries as images
- Discrete timeseries
Supported Datasets
- Casas Aruba (2011)
- Casas Milan (2009)
- Aras
- Amsterdam
- MitLab
- Tuebingen 2019
- Kasteren House A,B,C
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, Prediciting ADLs in Home assistant.
Support
- Todo buy me o coffee batch
Sources
- TODO cite every dataset
- TODO cite every algorithm package
- https://github.com/anfederico/Clairvoyant#readme
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.2a0.tar.gz
(88.3 kB
view hashes)
Built Distribution
pyadlml-0.0.2a0-py3-none-any.whl
(139.5 kB
view hashes)
Close
Hashes for pyadlml-0.0.2a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fe5deefeb2cd29d4e7a29b885c0d91c65aaf9e60316f05fc0ea7f6cb93cd7ca |
|
MD5 | 18c371ecd3156713b917f1ae80a26d20 |
|
BLAKE2b-256 | 0bb70ebbe7fe9fb6171099d3c4837a3c13bb744f97fa5c09af3c40c222bffa71 |