# Activities of Daily Living - Machine Learning
> Contains data preprocessing and visualization methods for ADL datasets.
![PyPI version](https://img.shields.io/pypi/v/pyadlml?style=flat-square)
![Download Stats](https://img.shields.io/pypi/dd/pyadlml?style=flat-square)
![License](https://img.shields.io/pypi/l/pyadlml?style=flat-square)
<p align="center"><img width=95% src="https://github.com/tcsvn/pyadlml/blob/master/media/pyadlml_banner.png"></p>
Activities of Daily living (ADLs) e.g cooking, working, sleeping and devices readings are recorded by smart home inhabitants. The goal is to predict inhabitants activities using device readings. Pyadlml offers an easy way to fetch, visualize and preprocess common datasets. My further goal is to replicate prominent work in this domain.
## Last Stable Release
```sh
$ pip install pyadlml
```
## Latest Development Changes
```sh
$ git clone https://github.com/tcsvn/pyadlml
$ cd pyadlml
```
## Usage example
From a jupyter notebook run
```python
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 (to come) or the 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
- Methods for importing data from Home Assistant/Activity Assistant
### Supported Datasets
- [x] Amsterdam [1]
- [x] Aras [2]
- [x] Casas Aruba (2011) [3]
- [ ] Casas Milan (2009) [4]
- [ ] Kasteren House A,B,C [5]
- [x] MitLab [6]
- [x] Tuebingen 2019 [7]
- [x] UCI Adl Binary [8]
### Models
#### Iid data
- [x] SVM
- [ ] Winnow algorithm
- [ ] Naive bayes
- [x] Decision Trees
#### Sequential discretized
- [ ] RNNs
- [ ] LSTMs
- [ ] HMMs
- [ ] HSMMs
- [ ] TCNs
#### Images
- [ ] CNN
- [ ] Transformer
#### Temporal points
- [ ] TPPs
## Replication list
Here are papers I plan to replicate
## Contributing
1. Fork it (<https://github.com/tcsvn/pyadlml/fork>)
2. Create your feature branch (`git checkout -b feature/fooBar`)
3. Commit your changes (`git commit -am 'Add some fooBar'`)
4. Push to the branch (`git push origin feature/fooBar`)
5. Create a new Pull Request
## Related projects
- [activity-assistant](https://github.com/tcsvn/activity-assistant) - Recording, predicting ADLs within Home assistant.
## Support
- Todo buy me a coffee batch
## Sources
- Datasets (TODO get all correct citations)
[1]: https://sites.google.com/site/tim0306/
[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]: WSU CASAS smart home project: D. Cook. Learning setting-generalized activity models for smart spaces. IEEE Intelligent Systems, 2011.
[4]: WSU CASAS smart home project: D. Cook. Learning setting-generalized activity models for smart spaces. IEEE Intelligent Systems, 2011.
[5]:
[6]:
[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.
- TODO cite every algorithm package
## License
MIT © [tcsvn](http://deadlink)
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共105个文件
py:96个
txt:4个
pkg-info:2个
资源分类:Python库 所属语言:Python 资源全名:pyadlml-0.0.5.6a0.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
Python库 | pyadlml-0.0.5.6a0.tar.gz (105个子文件)
setup.cfg 38B
MANIFEST.in 8B
README.md 4KB
PKG-INFO 6KB
PKG-INFO 6KB
activities.py 16KB
_model.py 14KB
devices.py 13KB
testing_homeassistant.py 13KB
_model_categorical.py 12KB
hmm.py 12KB
util.py 12KB
testing_ssm.py 12KB
devices.py 10KB
testing_hass_pchmm.py 10KB
testing_pyhsmm.py 10KB
preprocessing.py 10KB
devices.py 9KB
activities.py 9KB
util.py 9KB
pchmm.py 9KB
devices.py 9KB
testing_pendigits.py 8KB
metrics.py 8KB
interpr_hmm_logloss.py 7KB
interpr_hmm_f1.py 7KB
testing_kasteren.py 7KB
testing_kasteren_hsmm.py 7KB
testing_kasteren_pom.py 7KB
activities.py 7KB
bhsmm.py 7KB
interpr_hmm_lime.py 6KB
hmm.py 6KB
acts_and_devs.py 6KB
bhmm.py 6KB
act_and_devs.py 6KB
mitlab.py 5KB
bench_hmm.py 5KB
testing_hass_forwardhmm.py 5KB
io.py 5KB
fetch.py 5KB
aras.py 5KB
casas_aruba.py 5KB
discrete.py 5KB
load_hass_chris_and_stats.py 4KB
testa.py 4KB
bench_pchmm.py 4KB
raw.py 4KB
activities.py 4KB
calc_lime_dental_care.py 4KB
calc_lime_learning.py 4KB
calc_lime_sleeping.py 4KB
bhmm_hp.py 4KB
_dataset.py 3KB
image.py 3KB
calc_feature_importance.py 3KB
gen_hmm_vs_hsmm.py 3KB
util.py 3KB
amsterdam.py 3KB
tads.py 3KB
uci_adl_binary.py 3KB
load_n_save_datasets.py 3KB
feature_creation.py 2KB
image.py 2KB
train_hmm.py 2KB
model_selection.py 2KB
class_accs2latex.py 2KB
lastfired.py 2KB
testing_homeassistant.py 2KB
discrete.py 2KB
test_model.py 2KB
asdfasdf.py 2KB
feature_selection.py 2KB
changepoint.py 2KB
activity_assistant.py 1KB
conf_mat2latex.py 1KB
kasteren_test.py 1KB
setup.py 1KB
plot_freq_accs.py 1KB
homeassistant.py 1KB
plot_model_comparision.py 1KB
obj.py 910B
__init__.py 747B
raw.py 716B
util.py 705B
util.py 551B
casasaruba_test.py 416B
__init__.py 293B
__init__.py 153B
__init__.py 144B
__init__.py 0B
__init__.py 0B
__init__.py 0B
__init__.py 0B
__init__.py 0B
__init__.py 0B
__init__.py 0B
__init__.py 0B
__init__.py 0B
__init__.py 0B
共 105 条
- 1
- 2
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功