项目作者: bethgelab

项目描述 :
Blind source separation based on the probabilistic tensor factorisation framework
高级语言: Python
项目地址: git://github.com/bethgelab/decompose.git
创建时间: 2018-03-27T12:56:28Z
项目社区:https://github.com/bethgelab/decompose

开源协议:MIT License

下载


Decompose

Blind source separation based on the probabilistic tensor factorisation framework

Installation

Decompose demands python 3.6 and tensorflow 1.7. The newest github code of decompose can be installed using pip:

  1. pip3 install git+https://github.com/bethgelab/decompose

Quick start

Decompose provides an interface that is similar to the interface of scikit-learn:

  1. import numpy as np
  2. from sklearn.datasets import make_low_rank_matrix
  3. from decompose.sklearn import DECOMPOSE
  4. from decompose.distributions.cenNormal import CenNormal
  5. # create a numpy array containing a synthetic low rank dataset
  6. X = make_low_rank_matrix(n_samples=1000, n_features=1000,
  7. effective_rank=3, tail_strength=0.5)
  8. # create an instance of a decompose model
  9. model = DECOMPOSE(modelDirectory="/tmp/myNewModel",
  10. priors=[CenNormal(), CenNormal()],
  11. n_components=3)
  12. # train the model and transform the training data
  13. U0 = model.fit_transform(X)
  14. # learned filter bank
  15. U1 = model.components_
  16. # variance ratio of the sources
  17. varianceRatio = model.variance_ratio_
  18. # reconstruction of the data
  19. XHat = np.dot(U0.T, U1)

Publication

The publication linked to this repository is available on arXiv:
[1803.08882] Trace your sources in large-scale data: one ring to find them all

Version

The repository is still in alpha stage and does not yet contain all the code used in the publication above. In the next days documentation and features will be added.