cmm-0.1
توضیحات
Coherence Mixture Model
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | cmm-0.1 |
| نام | cmm |
| نسخه کتابخانه | 0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Virginia MS Rutten |
| ایمیل نویسنده | "Virginia M.S. Rutten" <vms.rutten@gmail.com> |
| آدرس صفحه اصلی | https://github.com/vrutten/cmm |
| آدرس اینترنتی | https://pypi.org/project/cmm/ |
| مجوز | BSD-3-Clause |
# Coherence Mixture Model
[](https://github.com/vrutten/cmm/raw/main/LICENSE)
[](https://pypi.org/project/cmm)
[](https://python.org)
[](https://github.com/vrutten/cmm/actions/workflows/ci.yml)
[](https://codecov.io/gh/vrutten/cmm)
or for now k-Means Clustering with coherence as distance metric
Unsupervised clustering algoirthm which clusters timeseries based on coherence.
Coherence between two signals is defined as:
```math
\mathcal{C}(\mathbf{\hat{x}}(\omega), \mathbf{\hat{\mu}}(\omega)) = \frac{|S_{x,\mu}(\omega)|^2}{S_{xx}(\omega)\cdot S_{\mu, \mu}(\omega)}
```
``` demo code
xnt: data
k: number of clusters
fs: sampling frequency
nperseg: number of timepoints in each trial (to compute FFT over and average)
itemax: max number of iterations to optimize
```
```
from cmm import CMM
cm = CMM(
xnt,
k=k,
fs=fs,
nperseg=nperseg,
)
cm.optimize(itemax=itemax)
print(cm.labels)
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8 | Python |
نحوه نصب
نصب پکیج whl cmm-0.1:
pip install cmm-0.1.whl
نصب پکیج tar.gz cmm-0.1:
pip install cmm-0.1.tar.gz