Full Code of tky823/ssspy for AI

main 38b9389e8b19 cached
270 files
1.3 MB
368.2k tokens
651 symbols
1 requests
Download .txt
Showing preview only (1,380K chars total). Download the full file or copy to clipboard to get everything.
Repository: tky823/ssspy
Branch: main
Commit: 38b9389e8b19
Files: 270
Total size: 1.3 MB

Directory structure:
gitextract_c37qrstt/

├── .github/
│   ├── PULL_REQUEST_TEMPLATE.md
│   ├── release.yaml
│   └── workflows/
│       ├── lint.yaml
│       ├── test_docs.yaml
│       ├── test_package_macos-13.yaml
│       ├── test_package_macos-13_python-3.10.yaml
│       ├── test_package_macos-13_python-3.11.yaml
│       ├── test_package_macos-13_python-3.12.yaml
│       ├── test_package_macos-13_python-3.8.yaml
│       ├── test_package_macos-13_python-3.9.yaml
│       ├── test_package_macos-latest.yaml
│       ├── test_package_macos-latest_python-3.10.yaml
│       ├── test_package_macos-latest_python-3.11.yaml
│       ├── test_package_macos-latest_python-3.12.yaml
│       ├── test_package_macos-latest_python-3.8.yaml
│       ├── test_package_macos-latest_python-3.9.yaml
│       ├── test_package_main.yaml
│       ├── test_package_ubuntu-latest.yaml
│       ├── test_package_ubuntu-latest_python-3.10.yaml
│       ├── test_package_ubuntu-latest_python-3.11.yaml
│       ├── test_package_ubuntu-latest_python-3.12.yaml
│       ├── test_package_ubuntu-latest_python-3.8.yaml
│       ├── test_package_ubuntu-latest_python-3.9.yaml
│       ├── test_package_windows-latest.yaml
│       ├── test_package_windows-latest_python-3.10.yaml
│       ├── test_package_windows-latest_python-3.11.yaml
│       ├── test_package_windows-latest_python-3.12.yaml
│       ├── test_package_windows-latest_python-3.8.yaml
│       ├── test_package_windows-latest_python-3.9.yaml
│       └── upload_package.yaml
├── .gitignore
├── .readthedocs.yaml
├── CHANGELOG.rst
├── LICENSE
├── MANIFEST.in
├── README.md
├── codecov.yaml
├── docs/
│   ├── Makefile
│   ├── api.rst
│   ├── changelog.rst
│   ├── conf.py
│   ├── index.rst
│   ├── make.bat
│   ├── pre_build.sh
│   ├── ssspy.algorithm.rst
│   ├── ssspy.bss.admmbss.rst
│   ├── ssspy.bss.base.rst
│   ├── ssspy.bss.cacgmm.rst
│   ├── ssspy.bss.fdica.rst
│   ├── ssspy.bss.hva.rst
│   ├── ssspy.bss.ica.rst
│   ├── ssspy.bss.ilrma.rst
│   ├── ssspy.bss.iva.rst
│   ├── ssspy.bss.mnmf.rst
│   ├── ssspy.bss.pdsbss.rst
│   ├── ssspy.bss.proxbss.rst
│   ├── ssspy.bss.rst
│   ├── ssspy.linalg.rst
│   ├── ssspy.special.rst
│   └── ssspy.transform.rst
├── notebooks/
│   ├── BSS/
│   │   ├── ADMMBSS/
│   │   │   ├── ADMMBSS.ipynb
│   │   │   └── ADMMBSS_multi-penalty.ipynb
│   │   ├── CACGMM/
│   │   │   └── CACGMM.ipynb
│   │   ├── FDICA/
│   │   │   ├── AuxFDICA-IP1.ipynb
│   │   │   ├── AuxFDICA-IP2.ipynb
│   │   │   ├── AuxLaplaceFDICA-IP1.ipynb
│   │   │   ├── AuxLaplaceFDICA-IP2.ipynb
│   │   │   ├── GradFDICA.ipynb
│   │   │   ├── GradLaplaceFDICA.ipynb
│   │   │   ├── NaturalGradFDICA.ipynb
│   │   │   └── NaturalGradLaplaceFDICA.ipynb
│   │   ├── HVA/
│   │   │   ├── ADMM-HVA.ipynb
│   │   │   └── HVA.ipynb
│   │   ├── ICA/
│   │   │   ├── FastICA.ipynb
│   │   │   ├── GradICA.ipynb
│   │   │   └── NaturalGradICA.ipynb
│   │   ├── ILRMA/
│   │   │   ├── GGDILRMA-IP1-MM.ipynb
│   │   │   ├── GGDILRMA-IP2-MM.ipynb
│   │   │   ├── GGDILRMA-ISS1-MM.ipynb
│   │   │   ├── GGDILRMA-ISS2-MM.ipynb
│   │   │   ├── GaussILRMA-IP1-ME.ipynb
│   │   │   ├── GaussILRMA-IP1-MM.ipynb
│   │   │   ├── GaussILRMA-IP2-ME.ipynb
│   │   │   ├── GaussILRMA-IP2-MM.ipynb
│   │   │   ├── GaussILRMA-IPA-ME.ipynb
│   │   │   ├── GaussILRMA-IPA-MM.ipynb
│   │   │   ├── GaussILRMA-ISS1-ME.ipynb
│   │   │   ├── GaussILRMA-ISS1-MM.ipynb
│   │   │   ├── GaussILRMA-ISS2-ME.ipynb
│   │   │   ├── GaussILRMA-ISS2-MM.ipynb
│   │   │   ├── TILRMA-IP1-ME.ipynb
│   │   │   ├── TILRMA-IP1-MM.ipynb
│   │   │   ├── TILRMA-IP2-ME.ipynb
│   │   │   ├── TILRMA-IP2-MM.ipynb
│   │   │   ├── TILRMA-ISS1-ME.ipynb
│   │   │   ├── TILRMA-ISS1-MM.ipynb
│   │   │   ├── TILRMA-ISS2-ME.ipynb
│   │   │   └── TILRMA-ISS2-MM.ipynb
│   │   ├── IPSDTA/
│   │   │   ├── GaussIPSDTA-VCD.ipynb
│   │   │   └── TIPSDTA-VCD.ipynb
│   │   ├── IVA/
│   │   │   ├── AuxGaussIVA-IP1.ipynb
│   │   │   ├── AuxGaussIVA-IP2.ipynb
│   │   │   ├── AuxGaussIVA-IPA.ipynb
│   │   │   ├── AuxGaussIVA-ISS1.ipynb
│   │   │   ├── AuxGaussIVA-ISS2.ipynb
│   │   │   ├── AuxIVA-IP1.ipynb
│   │   │   ├── AuxIVA-IP2.ipynb
│   │   │   ├── AuxIVA-IPA.ipynb
│   │   │   ├── AuxIVA-ISS1.ipynb
│   │   │   ├── AuxIVA-ISS2.ipynb
│   │   │   ├── AuxLaplaceIVA-IP1.ipynb
│   │   │   ├── AuxLaplaceIVA-IP2.ipynb
│   │   │   ├── AuxLaplaceIVA-IPA.ipynb
│   │   │   ├── AuxLaplaceIVA-ISS1.ipynb
│   │   │   ├── AuxLaplaceIVA-ISS2.ipynb
│   │   │   ├── FastIVA.ipynb
│   │   │   ├── FasterIVA.ipynb
│   │   │   ├── GradGaussIVA.ipynb
│   │   │   ├── GradIVA.ipynb
│   │   │   ├── GradLaplaceIVA.ipynb
│   │   │   ├── NaturalGradGaussIVA.ipynb
│   │   │   ├── NaturalGradIVA.ipynb
│   │   │   └── NaturalGradLaplaceIVA.ipynb
│   │   ├── MNMF/
│   │   │   ├── FastGaussMNMF-IP1.ipynb
│   │   │   ├── FastGaussMNMF-IP2.ipynb
│   │   │   └── GaussMNMF.ipynb
│   │   └── PDSBSS/
│   │       ├── PDSBSS.ipynb
│   │       ├── PDSBSS_masking.ipynb
│   │       └── PDSBSS_multi-penalty.ipynb
│   └── Examples/
│       └── Getting-Started.ipynb
├── pyproject.toml
├── ssspy/
│   ├── __init__.py
│   ├── algorithm/
│   │   ├── __init__.py
│   │   ├── minimal_distortion_principle.py
│   │   ├── permutation_alignment.py
│   │   └── projection_back.py
│   ├── bss/
│   │   ├── __init__.py
│   │   ├── _flooring.py
│   │   ├── _psd.py
│   │   ├── _select_pair.py
│   │   ├── _solve_permutation.py
│   │   ├── _update_spatial_model.py
│   │   ├── admmbss.py
│   │   ├── base.py
│   │   ├── cacgmm.py
│   │   ├── fdica.py
│   │   ├── hva.py
│   │   ├── ica.py
│   │   ├── ilrma.py
│   │   ├── ipsdta.py
│   │   ├── iva.py
│   │   ├── mnmf.py
│   │   ├── pdsbss.py
│   │   └── proxbss.py
│   ├── io/
│   │   └── __init__.py
│   ├── linalg/
│   │   ├── __init__.py
│   │   ├── _solve.py
│   │   ├── cubic.py
│   │   ├── eigh.py
│   │   ├── inv.py
│   │   ├── lqpqm.py
│   │   ├── mean.py
│   │   ├── polynomial.py
│   │   ├── prox.py
│   │   ├── quadratic.py
│   │   └── sqrtm.py
│   ├── special/
│   │   ├── __init__.py
│   │   ├── flooring.py
│   │   ├── logsumexp.py
│   │   ├── psd.py
│   │   └── softmax.py
│   ├── transform/
│   │   ├── __init__.py
│   │   ├── pca.py
│   │   └── whiten.py
│   └── utils/
│       ├── __init__.py
│       ├── dataset/
│       │   ├── __init__.py
│       │   ├── mird.py
│       │   └── sisec2010.py
│       ├── flooring.py
│       └── select_pair.py
└── tests/
    ├── conftest.py
    ├── dummy/
    │   ├── callback.py
    │   ├── io.py
    │   └── utils/
    │       └── dataset/
    │           └── __init__.py
    ├── mock/
    │   └── regression/
    │       └── bss/
    │           ├── cacgmm/
    │           │   └── url.json
    │           ├── fdica/
    │           │   ├── aux_laplace_fdica/
    │           │   │   ├── IP1/
    │           │   │   │   └── url.json
    │           │   │   └── IP2/
    │           │   │       └── url.json
    │           │   ├── grad_laplace_fdica/
    │           │   │   ├── holonomic/
    │           │   │   │   └── url.json
    │           │   │   └── nonholonomic/
    │           │   │       └── url.json
    │           │   └── natural_grad_laplace_fdica/
    │           │       ├── holonomic/
    │           │       │   └── url.json
    │           │       └── nonholonomic/
    │           │           └── url.json
    │           ├── ilrma/
    │           │   ├── gauss_ilrma/
    │           │   │   ├── IP1/
    │           │   │   │   ├── ME/
    │           │   │   │   │   └── url.json
    │           │   │   │   └── MM/
    │           │   │   │       └── url.json
    │           │   │   ├── IP2/
    │           │   │   │   ├── ME/
    │           │   │   │   │   └── url.json
    │           │   │   │   └── MM/
    │           │   │   │       └── url.json
    │           │   │   ├── IPA/
    │           │   │   │   ├── ME/
    │           │   │   │   │   └── url.json
    │           │   │   │   └── MM/
    │           │   │   │       └── url.json
    │           │   │   ├── ISS1/
    │           │   │   │   ├── ME/
    │           │   │   │   │   └── url.json
    │           │   │   │   └── MM/
    │           │   │   │       └── url.json
    │           │   │   └── ISS2/
    │           │   │       ├── ME/
    │           │   │       │   └── url.json
    │           │   │       └── MM/
    │           │   │           └── url.json
    │           │   ├── ggd_ilrma/
    │           │   │   ├── IP1/
    │           │   │   │   └── MM/
    │           │   │   │       └── url.json
    │           │   │   ├── IP2/
    │           │   │   │   └── MM/
    │           │   │   │       └── url.json
    │           │   │   ├── ISS1/
    │           │   │   │   └── MM/
    │           │   │   │       └── url.json
    │           │   │   └── ISS2/
    │           │   │       └── MM/
    │           │   │           └── url.json
    │           │   └── t_ilrma/
    │           │       ├── IP1/
    │           │       │   ├── ME/
    │           │       │   │   └── url.json
    │           │       │   └── MM/
    │           │       │       └── url.json
    │           │       ├── IP2/
    │           │       │   ├── ME/
    │           │       │   │   └── url.json
    │           │       │   └── MM/
    │           │       │       └── url.json
    │           │       ├── ISS1/
    │           │       │   ├── ME/
    │           │       │   │   └── url.json
    │           │       │   └── MM/
    │           │       │       └── url.json
    │           │       └── ISS2/
    │           │           ├── ME/
    │           │           │   └── url.json
    │           │           └── MM/
    │           │               └── url.json
    │           ├── ipsdta/
    │           │   ├── gauss_ipsdta/
    │           │   │   └── VCD/
    │           │   │       └── MM/
    │           │   │           └── url.json
    │           │   └── t_ipsdta/
    │           │       └── VCD/
    │           │           └── MM/
    │           │               └── url.json
    │           ├── iva/
    │           │   ├── aux_iva/
    │           │   │   ├── IP1/
    │           │   │   │   └── url.json
    │           │   │   ├── IP2/
    │           │   │   │   └── url.json
    │           │   │   ├── IPA/
    │           │   │   │   └── url.json
    │           │   │   ├── ISS1/
    │           │   │   │   └── url.json
    │           │   │   └── ISS2/
    │           │   │       └── url.json
    │           │   ├── fast_iva/
    │           │   │   └── url.json
    │           │   ├── grad_iva/
    │           │   │   ├── holonomic/
    │           │   │   │   └── url.json
    │           │   │   └── nonholonomic/
    │           │   │       └── url.json
    │           │   └── natural_grad_iva/
    │           │       ├── holonomic/
    │           │       │   └── url.json
    │           │       └── nonholonomic/
    │           │           └── url.json
    │           └── mnmf/
    │               ├── fast_gauss_mnmf/
    │               │   ├── IP1/
    │               │   │   └── url.json
    │               │   └── IP2/
    │               │       └── url.json
    │               └── gauss_mnmf/
    │                   └── url.json
    ├── package/
    │   ├── algorithm/
    │   │   ├── test_minimal_distortion_principle.py
    │   │   ├── test_permutation_alignment.py
    │   │   └── test_projection_back.py
    │   ├── bss/
    │   │   ├── test_admmbss.py
    │   │   ├── test_base.py
    │   │   ├── test_cacgmm.py
    │   │   ├── test_fdica.py
    │   │   ├── test_hva.py
    │   │   ├── test_ica.py
    │   │   ├── test_ilrma.py
    │   │   ├── test_ipsdta.py
    │   │   ├── test_iterative_methods.py
    │   │   ├── test_iva.py
    │   │   ├── test_mnmf.py
    │   │   ├── test_pair_selector.py
    │   │   ├── test_pdsbss.py
    │   │   ├── test_proxbss.py
    │   │   ├── test_psd_legacy.py
    │   │   ├── test_solve_permutation.py
    │   │   └── test_update_spatial_model.py
    │   ├── io/
    │   │   └── test_wavread.py
    │   ├── linalg/
    │   │   ├── test_cubic.py
    │   │   ├── test_eigh.py
    │   │   ├── test_gmean.py
    │   │   ├── test_inv.py
    │   │   ├── test_lqpqm.py
    │   │   ├── test_polynomial.py
    │   │   └── test_sqrtm.py
    │   ├── special/
    │   │   ├── test_logsumexp.py
    │   │   ├── test_psd.py
    │   │   └── test_softmax.py
    │   ├── transform/
    │   │   ├── test_pca.py
    │   │   └── test_whiten.py
    │   └── utils/
    │       ├── test_dataset.py
    │       └── test_select_pair.py
    ├── regression/
    │   └── bss/
    │       ├── test_cacgmm.py
    │       ├── test_fdica.py
    │       ├── test_ilrma.py
    │       ├── test_ipsdta.py
    │       ├── test_iva.py
    │       └── test_mnmf.py
    └── scripts/
        └── download_all.py

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
## Summary
<!-- Describe brief summary of this PR. -->

<!--

## TODO
Describe what to do next.

-->

================================================
FILE: .github/release.yaml
================================================
changelog:
  categories:
    - title: Breaking Changes 🛠
      labels:
        - breaking changes
    - title: New Features 🎉
      labels:
        - new feature
    - title: Bug Fixes 🐛
      labels:
        - bug
        - bug fix
    - title: Notebooks
        - notebooks
    - title: Other Changes
      labels:
        - "*"


================================================
FILE: .github/workflows/lint.yaml
================================================
name: lint
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  lint:
    name: Run linters
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Set up Python 3.12
        uses: actions/setup-python@v4
        with:
          python-version: "3.12"
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install ".[dev]"
      - name: Run linters
        run: |
          # See pyproject.toml
          isort --line-length 100 ssspy tests
          flake8 --max-line-length=100 --ignore=E203,W503,W504 --exclude ssspy/_version.py ssspy tests
      - name: Run formatters
        run: |
          python -m black --config pyproject.toml --check ssspy tests


================================================
FILE: .github/workflows/test_docs.yaml
================================================
name: tests for docs
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  build:
    name: Build docs
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Set up Python 3.12
        uses: actions/setup-python@v4
        with:
          python-version: "3.12"
      - name: Install dependencies
        run: |
          sudo apt-get update
          sudo apt-get install pandoc
          python -m pip install --upgrade pip
          pip install ".[docs,notebooks]"
      - name: Build docs
        run: |
          . ./docs/pre_build.sh
          cd docs/
          sphinx-build -W ./ ./_build/html/


================================================
FILE: .github/workflows/test_package_macos-13.yaml
================================================
name: macos-13
on:
  workflow_call:
    inputs:
      python-version:
        required: true
        type: string
    secrets:
      CODECOV_TOKEN:
        required: true
      TEST_PYPI_API_TOKEN:
        required: true
jobs:
  package:
    uses: ./.github/workflows/test_package_main.yaml
    with:
      # macos-13: x86_64, macos-latest: arm
      # See https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners
      os: macos-13
      python-version: ${{ inputs.python-version }}
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_macos-13_python-3.10.yaml
================================================
name: macos-13/3.10
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  package:
    uses: ./.github/workflows/test_package_macos-13.yaml
    with:
      python-version: "3.10"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_macos-13_python-3.11.yaml
================================================
name: macos-13/3.11
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  package:
    uses: ./.github/workflows/test_package_macos-13.yaml
    with:
      python-version: "3.11"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_macos-13_python-3.12.yaml
================================================
name: macos-13/3.12
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  package:
    uses: ./.github/workflows/test_package_macos-13.yaml
    with:
      python-version: "3.12"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_macos-13_python-3.8.yaml
================================================
name: macos-13/3.8
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  package:
    uses: ./.github/workflows/test_package_macos-13.yaml
    with:
      python-version: "3.8"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_macos-13_python-3.9.yaml
================================================
name: macos-13/3.9
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  package:
    uses: ./.github/workflows/test_package_macos-13.yaml
    with:
      python-version: "3.9"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_macos-latest.yaml
================================================
name: macos-latest
on:
  workflow_call:
    inputs:
      python-version:
        required: true
        type: string
    secrets:
      CODECOV_TOKEN:
        required: true
      TEST_PYPI_API_TOKEN:
        required: true
jobs:
  package:
    uses: ./.github/workflows/test_package_main.yaml
    with:
      # macos-13: x86_64, macos-latest: arm
      # See https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners
      os: macos-latest
      python-version: ${{ inputs.python-version }}
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_macos-latest_python-3.10.yaml
================================================
name: macos-latest/3.10
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  package:
    uses: ./.github/workflows/test_package_macos-latest.yaml
    with:
      python-version: "3.10"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_macos-latest_python-3.11.yaml
================================================
name: macos-latest/3.11
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  package:
    uses: ./.github/workflows/test_package_macos-latest.yaml
    with:
      python-version: "3.11"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_macos-latest_python-3.12.yaml
================================================
name: macos-latest/3.12
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  package:
    uses: ./.github/workflows/test_package_macos-latest.yaml
    with:
      python-version: "3.12"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_macos-latest_python-3.8.yaml
================================================
name: macos-latest/3.8
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  package:
    uses: ./.github/workflows/test_package_macos-latest.yaml
    with:
      python-version: "3.8"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_macos-latest_python-3.9.yaml
================================================
name: macos-latest/3.9
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  package:
    uses: ./.github/workflows/test_package_macos-latest.yaml
    with:
      python-version: "3.9"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_main.yaml
================================================
name: test package
on:
  workflow_call:
    inputs:
      os:
        required: true
        type: string
      python-version:
        required: true
        type: string
    secrets:
      CODECOV_TOKEN:
        required: true
      TEST_PYPI_API_TOKEN:
        required: true
jobs:
  build:
    name: Run tests with pytest
    runs-on: ${{ inputs.os }}
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Set up Python ${{ inputs.python-version }}
        uses: actions/setup-python@v4
        with:
          python-version: ${{ inputs.python-version }}
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -e ".[dev,tests]"
      - name: Preparation of pytest
        run: |
          python tests/scripts/download_all.py
      - name: Pytest (run all tests including redundant ones)
        id: run_redundant
        if: startsWith(github.head_ref, 'release/')
        run: |
          pytest --run-redundant -vvv -n 16 --cov=./ssspy --cov-report=xml tests/package/
      - name: Pytest (skip redundant tests)
        if: steps.run_redundant.conclusion == 'skipped'
        run: |
          pytest -vvv -n 16 --cov=./ssspy --cov-report=xml tests/package/
      - name: Pytest (regression tests)
        run: |
          pytest -vvv -n 16 tests/regression/
      - name: Upload coverage reports to Codecov
        if: inputs.python-version == '3.12' && inputs.os == 'ubuntu-latest'
        uses: codecov/codecov-action@v3
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
        with:
          fail_ci_if_error: true
  upload_package:
    needs:
      - build
    permissions:
      id-token: write
    secrets:
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    if: github.event_name == 'pull_request' && inputs.python-version == '3.12' && inputs.os == 'ubuntu-latest'
    uses: ./.github/workflows/upload_package.yaml


================================================
FILE: .github/workflows/test_package_ubuntu-latest.yaml
================================================
name: ubuntu-latest
on:
  workflow_call:
    inputs:
      python-version:
        required: true
        type: string
    secrets:
      CODECOV_TOKEN:
        required: true
      TEST_PYPI_API_TOKEN:
        required: true
jobs:
  package:
    uses: ./.github/workflows/test_package_main.yaml
    with:
      os: ubuntu-latest
      python-version: ${{ inputs.python-version }}
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_ubuntu-latest_python-3.10.yaml
================================================
name: ubuntu-latest/3.10
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  package:
    uses: ./.github/workflows/test_package_ubuntu-latest.yaml
    with:
      python-version: "3.10"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_ubuntu-latest_python-3.11.yaml
================================================
name: ubuntu-latest/3.11
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  package:
    uses: ./.github/workflows/test_package_ubuntu-latest.yaml
    with:
      python-version: "3.11"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_ubuntu-latest_python-3.12.yaml
================================================
name: ubuntu-latest/3.12
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  package:
    uses: ./.github/workflows/test_package_ubuntu-latest.yaml
    with:
      python-version: "3.12"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_ubuntu-latest_python-3.8.yaml
================================================
name: ubuntu-latest/3.8
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  package:
    uses: ./.github/workflows/test_package_ubuntu-latest.yaml
    with:
      python-version: "3.8"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_ubuntu-latest_python-3.9.yaml
================================================
name: ubuntu-latest/3.9
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  package:
    uses: ./.github/workflows/test_package_ubuntu-latest.yaml
    with:
      python-version: "3.9"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_windows-latest.yaml
================================================
name: windows-latest
on:
  workflow_call:
    inputs:
      python-version:
        required: true
        type: string
    secrets:
      CODECOV_TOKEN:
        required: true
      TEST_PYPI_API_TOKEN:
        required: true
jobs:
  package:
    uses: ./.github/workflows/test_package_main.yaml
    with:
      os: windows-latest
      python-version: ${{ inputs.python-version }}
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_windows-latest_python-3.10.yaml
================================================
name: windows-latest/3.10
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  package:
    uses: ./.github/workflows/test_package_windows-latest.yaml
    with:
      python-version: "3.10"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_windows-latest_python-3.11.yaml
================================================
name: windows-latest/3.11
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  package:
    uses: ./.github/workflows/test_package_windows-latest.yaml
    with:
      python-version: "3.11"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_windows-latest_python-3.12.yaml
================================================
name: windows-latest/3.12
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  package:
    uses: ./.github/workflows/test_package_windows-latest.yaml
    with:
      python-version: "3.12"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_windows-latest_python-3.8.yaml
================================================
name: windows-latest/3.8
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  package:
    uses: ./.github/workflows/test_package_windows-latest.yaml
    with:
      python-version: "3.8"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/test_package_windows-latest_python-3.9.yaml
================================================
name: windows-latest/3.9
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  package:
    uses: ./.github/workflows/test_package_windows-latest.yaml
    with:
      python-version: "3.9"
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
    permissions:
      id-token: write


================================================
FILE: .github/workflows/upload_package.yaml
================================================
# based on 
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
# https://github.com/pypa/gh-action-pypi-publish

# TODO: update this config for practical use

name: Upload package to PyPI
on:
  workflow_call:
    secrets:
      TEST_PYPI_API_TOKEN:
        required: true
jobs:
  build:
    name: Build and upload package
    runs-on: ubuntu-latest
    permissions:
      id-token: write
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          # to retrive tags
          fetch-depth: 0
      - name: Set up Python 3.x
        uses: actions/setup-python@v4
        with:
          python-version: '3.x'
      - name: Show git tags
        run: |
          git tag
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install build wheel twine
      - name: Build
        run: |
          python -m build
      - name: Publish distribution to TestPyPI
        env:
          TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
        run: |
          python -m twine upload --repository testpypi --username __token__ --password ${TEST_PYPI_API_TOKEN} dist/*


================================================
FILE: .gitignore
================================================
# For building docs
docs/_notebooks/

# For local
.data/
_version.py

# For Mac
.DS_Store

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
#   However, in case of collaboration, if having platform-specific dependencies or dependencies
#   having no cross-platform support, pipenv may install dependencies that don't work, or not
#   install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/


================================================
FILE: .readthedocs.yaml
================================================
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
  os: ubuntu-20.04
  tools:
    python: "3.11"
    # You can also specify other tool versions:
    # nodejs: "16"
    # rust: "1.55"
    # golang: "1.17"
  jobs:
    pre_build:
      - . ./docs/pre_build.sh

# Build documentation in the docs/ directory with Sphinx
sphinx:
  configuration: docs/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
# formats:
#    - pdf

# Optionally declare the Python requirements required to build your docs
# python:
#   install:
#   - method: pip
#     path: .
#     extra_requirements:
#     - docs
#     - notebooks


================================================
FILE: CHANGELOG.rst
================================================
Changelog
#########

v0.2.0
******

What's Changed
==============

Breaking Changes 🛠
-------------------
* Rename `aux` to `auxiliary` by @tky823 in https://github.com/tky823/ssspy/pull/268
* Detailed build status by @tky823 in https://github.com/tky823/ssspy/pull/288

New Features 🎉
---------------
* Implementation of harmonic vector analysis by @tky823 in https://github.com/tky823/ssspy/pull/271
* Implementation of ADMM-HVA by @tky823 in https://github.com/tky823/ssspy/pull/281

Bug Fixes 🐛
------------
* Fix test coverage by @tky823 in https://github.com/tky823/ssspy/pull/269
* Fix timing of uploading package by @tky823 in https://github.com/tky823/ssspy/pull/273
* Remove status badge of lint by @tky823 in https://github.com/tky823/ssspy/pull/274

Other Changes
-------------
* Upload package to TestPyPI by @tky823 in https://github.com/tky823/ssspy/pull/267
* Remove duplicate uploads to TestPyPI by @tky823 in https://github.com/tky823/ssspy/pull/270
* Use flooring function to compute norm. by @tky823 in https://github.com/tky823/ssspy/pull/276
* Regression tests by @tky823 in https://github.com/tky823/ssspy/pull/238
* Add `needs` to upload_package job in GHA. by @tky823 in https://github.com/tky823/ssspy/pull/277
* Update actions/checkout in GitHub actions by @tky823 in https://github.com/tky823/ssspy/pull/279
* Hugging Face demo by @tky823 in https://github.com/tky823/ssspy/pull/282
* Set permissions in workflows by @tky823 in https://github.com/tky823/ssspy/pull/289
* Bump up version to 0.2.0 by @tky823 in https://github.com/tky823/ssspy/pull/290


**Full Changelog**: https://github.com/tky823/ssspy/compare/v0.1.7...v0.2.0

v0.1.7
******

Summary
=======
In this version, we improve the management of the package.
As a new BSS method, ADMM-BSS is newly added.

What's Changed
==============

Breaking Changes 🛠
-------------------
* Include ssspy only as package by @tky823 in https://github.com/tky823/ssspy/pull/253
* Add ``MANIFEST.in`` by @tky823 in https://github.com/tky823/ssspy/pull/257

New Features 🎉
---------------
* Implementation of ADMM-IVA by @tky823 in https://github.com/tky823/ssspy/pull/263
* Support ADMM-BSS_multi-penalty by @tky823 in https://github.com/tky823/ssspy/pull/265

Bug Fixes 🐛
------------
* Fix document deployment by @tky823 in https://github.com/tky823/ssspy/pull/255
* Update some variables depending on ``demix_filter`` instead of ``self.algorithm``. by @tky823 in https://github.com/tky823/ssspy/pull/260

Other Changes
-------------
* Release notes by @tky823 in https://github.com/tky823/ssspy/pull/246
* Add label for breaking changes by @tky823 in https://github.com/tky823/ssspy/pull/247
* Notebooks/getting started by @tky823 in https://github.com/tky823/ssspy/pull/248
* Update docs and notebooks to install ``ssspy`` from pypi by @tky823 in https://github.com/tky823/ssspy/pull/251
* Detect reformatting by @tky823 in https://github.com/tky823/ssspy/pull/258
* Make PDSBSSBase inherit IterativeMethodBase by @tky823 in https://github.com/tky823/ssspy/pull/262


**Full Changelog**: `v0.1.6...v0.1.7 <https://github.com/tky823/ssspy/compare/v0.1.6...v0.1.7>`_

v0.1.6
******

Summary
=======
In this version, the following BSS methods are newly added 🚀

- Fast MNMF
- IVA-IPA
- ILRMA-IPA

What's Changed
==============
* Bump up version to v0.1.5 by @tky823 in https://github.com/tky823/ssspy/pull/222
* Rename "XXXbase" to "XXXBase" by @tky823 in https://github.com/tky823/ssspy/pull/224
* Move default pair_selector by @tky823 in https://github.com/tky823/ssspy/pull/225
* Implement Fast MNMF by @tky823 in https://github.com/tky823/ssspy/pull/226
* Score-based permutation solver by @tky823 in https://github.com/tky823/ssspy/pull/221
* Specify flooring function in each method by @tky823 in https://github.com/tky823/ssspy/pull/228
* Solver for cubic equations. by @tky823 in https://github.com/tky823/ssspy/pull/230
* Consider corner case of cubic polynomial by @tky823 in https://github.com/tky823/ssspy/pull/233
* Use pytest-xdist by @tky823 in https://github.com/tky823/ssspy/pull/235
* Implement IVA-IPA by @tky823 in https://github.com/tky823/ssspy/pull/234
* Update links to reference by @tky823 in https://github.com/tky823/ssspy/pull/237
* Fix shape of varphi in tests of IVA by @tky823 in https://github.com/tky823/ssspy/pull/240
* End support of python=3.7 by @tky823 in https://github.com/tky823/ssspy/pull/243
* Stabilize IVA-IPA related algorithms by @tky823 in https://github.com/tky823/ssspy/pull/241
* Implementation of ILRMA-IPA by @tky823 in https://github.com/tky823/ssspy/pull/244


**Full Changelog**: `v0.1.5...v0.1.6 <https://github.com/tky823/ssspy/compare/v0.1.5...v0.1.6>`_


================================================
FILE: LICENSE
================================================
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright 2022 Takuya Hasumi

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.


================================================
FILE: MANIFEST.in
================================================
exclude .gitignore
exclude *.yaml
recursive-include ssspy *.py
prune .github
prune tests
prune docs
prune notebooks


================================================
FILE: README.md
================================================
# ssspy
[![Documentation Status](https://readthedocs.org/projects/sound-source-separation-python/badge/?version=latest)](https://sound-source-separation-python.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/tky823/ssspy/branch/main/graph/badge.svg)](https://codecov.io/gh/tky823/ssspy)
[![Open in Spaces](https://huggingface.co/datasets/huggingface/badges/resolve/main/open-in-hf-spaces-sm.svg)](https://tky823-ssspy-demo.hf.space/)

A Python toolkit for sound source separation.

## Build Status

| Python | Ubuntu | MacOS (x86_64) | MacOS (arm64) | Windows |
|:-:|:-:|:-:|:-:|:-:|
| 3.9 | [![ubuntu-latest/3.9](https://github.com/tky823/ssspy/actions/workflows/test_package_ubuntu-latest_python-3.9.yaml/badge.svg?branch=main)](https://github.com/tky823/ssspy/actions/workflows/test_package_ubuntu-latest_python-3.9.yaml) | [![macos-13/3.9](https://github.com/tky823/ssspy/actions/workflows/test_package_macos-13_python-3.9.yaml/badge.svg?branch=main)](https://github.com/tky823/ssspy/actions/workflows/test_package_macos-13_python-3.9.yaml) | [![macos-latest/3.9](https://github.com/tky823/ssspy/actions/workflows/test_package_macos-latest_python-3.9.yaml/badge.svg?branch=main)](https://github.com/tky823/ssspy/actions/workflows/test_package_macos-latest_python-3.9.yaml) | [![windows-latest/3.9](https://github.com/tky823/ssspy/actions/workflows/test_package_windows-latest_python-3.9.yaml/badge.svg?branch=main)](https://github.com/tky823/ssspy/actions/workflows/test_package_windows-latest_python-3.9.yaml) |
| 3.10 | [![ubuntu-latest/3.10](https://github.com/tky823/ssspy/actions/workflows/test_package_ubuntu-latest_python-3.10.yaml/badge.svg?branch=main)](https://github.com/tky823/ssspy/actions/workflows/test_package_ubuntu-latest_python-3.10.yaml) | [![macos-13/3.10](https://github.com/tky823/ssspy/actions/workflows/test_package_macos-13_python-3.10.yaml/badge.svg?branch=main)](https://github.com/tky823/ssspy/actions/workflows/test_package_macos-13_python-3.10.yaml) | [![macos-latest/3.10](https://github.com/tky823/ssspy/actions/workflows/test_package_macos-latest_python-3.10.yaml/badge.svg?branch=main)](https://github.com/tky823/ssspy/actions/workflows/test_package_macos-latest_python-3.10.yaml) | [![windows-latest/3.10](https://github.com/tky823/ssspy/actions/workflows/test_package_windows-latest_python-3.10.yaml/badge.svg?branch=main)](https://github.com/tky823/ssspy/actions/workflows/test_package_windows-latest_python-3.10.yaml) |
| 3.11 | [![ubuntu-latest/3.11](https://github.com/tky823/ssspy/actions/workflows/test_package_ubuntu-latest_python-3.11.yaml/badge.svg?branch=main)](https://github.com/tky823/ssspy/actions/workflows/test_package_ubuntu-latest_python-3.11.yaml) | [![macos-13/3.11](https://github.com/tky823/ssspy/actions/workflows/test_package_macos-13_python-3.11.yaml/badge.svg?branch=main)](https://github.com/tky823/ssspy/actions/workflows/test_package_macos-13_python-3.11.yaml) | [![macos-latest/3.11](https://github.com/tky823/ssspy/actions/workflows/test_package_macos-latest_python-3.11.yaml/badge.svg?branch=main)](https://github.com/tky823/ssspy/actions/workflows/test_package_macos-latest_python-3.11.yaml) | [![windows-latest/3.11](https://github.com/tky823/ssspy/actions/workflows/test_package_windows-latest_python-3.11.yaml/badge.svg?branch=main)](https://github.com/tky823/ssspy/actions/workflows/test_package_windows-latest_python-3.11.yaml) |
| 3.12 | [![ubuntu-latest/3.12](https://github.com/tky823/ssspy/actions/workflows/test_package_ubuntu-latest_python-3.12.yaml/badge.svg?branch=main)](https://github.com/tky823/ssspy/actions/workflows/test_package_ubuntu-latest_python-3.12.yaml) | [![macos-13/3.12](https://github.com/tky823/ssspy/actions/workflows/test_package_macos-13_python-3.12.yaml/badge.svg?branch=main)](https://github.com/tky823/ssspy/actions/workflows/test_package_macos-13_python-3.12.yaml) | [![macos-latest/3.12](https://github.com/tky823/ssspy/actions/workflows/test_package_macos-latest_python-3.12.yaml/badge.svg?branch=main)](https://github.com/tky823/ssspy/actions/workflows/test_package_macos-latest_python-3.12.yaml) | [![windows-latest/3.12](https://github.com/tky823/ssspy/actions/workflows/test_package_windows-latest_python-3.12.yaml/badge.svg?branch=main)](https://github.com/tky823/ssspy/actions/workflows/test_package_windows-latest_python-3.12.yaml) |


## Installation
You can install by pip.
```shell
pip install ssspy
```

To install latest version,
```shell
pip install git+https://github.com/tky823/ssspy.git
```

Instead, you can build package from source.
```shell
git clone https://github.com/tky823/ssspy.git
cd ssspy
pip install .
```

If you cannot install `ssspy` due to failure in building wheel for numpy, please install numpy in advance.

## Build Documentation Locally (optional)
To build the documentation locally, you have to include `docs` and `notebooks` when installing `ssspy`.
```shell
pip install -e ".[docs,notebooks]"
```

You need to convert some notebooks by the following command:
```shell
# in ssspy/
. ./docs/pre_build.sh
```

When you build the documentation, run the following command.
```shell
cd docs/
make html
```

Or, you can build the documentation automatically using `sphinx-autobuild`.
```shell
# in ssspy/
sphinx-autobuild docs docs/_build/html
```

## Blind Source Separation Methods

| Method | Notebooks |
|:-:|:-:|
| Independent Component Analysis (ICA) [1-3] | Gradient-descent-based ICA: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ICA/GradICA.ipynb) <br> Natural-gradient-descent-based ICA: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ICA/NaturalGradICA.ipynb) <br> Fast ICA: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ICA/FastICA.ipynb) |
| Frequency-Domain Independent Component Analysis (FDICA) [4-6] | Gradient-descent-based FDICA: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/FDICA/GradFDICA.ipynb) <br> Natural-gradient-descent-based FDICA: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/FDICA/NaturalGradFDICA.ipynb) <br> Auxiliary-function-based FDICA (IP1): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/FDICA/AuxFDICA-IP1.ipynb) <br> Auxiliary-function-based FDICA (IP2): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/FDICA/AuxFDICA-IP2.ipynb) <br> Gradient-descent-based Laplace-FDICA: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/FDICA/GradLaplaceFDICA.ipynb) <br> Natural-gradient-descent-based Laplace-FDICA: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/FDICA/NaturalGradLaplaceFDICA.ipynb) <br> Auxiliary-function-based Laplace-FDICA (IP1): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/FDICA/AuxLaplaceFDICA-IP1.ipynb) <br> Auxiliary-function-based Laplace-FDICA (IP2): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/FDICA/AuxLaplaceFDICA-IP2.ipynb) |
| Independent Vector Analysis (IVA) [7-14] | Gradient-descent-based IVA: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/GradIVA.ipynb) <br> Natural-gradient-descent-based IVA: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/NaturalGradIVA.ipynb) <br> Fast IVA: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/FastIVA.ipynb) <br> Faster IVA: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/FasterIVA.ipynb) <br> Auxiliary-function-based IVA (IP1): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/AuxIVA-IP1.ipynb) <br> Auxiliary-function-based IVA (IP2): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/AuxIVA-IP2.ipynb) <br> Auxiliary-function-based IVA (ISS1): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/AuxIVA-ISS1.ipynb) <br> Auxiliary-function-based IVA (ISS2): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/AuxIVA-ISS2.ipynb) <br> Auxiliary-function-based IVA (IPA): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/AuxIVA-IPA.ipynb) <br> Gradient-descent-based Laplace-IVA: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/GradLaplaceIVA.ipynb) <br> Natural-gradient-descent-based Laplace-IVA: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/NaturalGradLaplaceIVA.ipynb) <br> Auxiliary-function-based Laplace-IVA (IP1): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/AuxLaplaceIVA-IP1.ipynb) <br> Auxiliary-function-based Laplace-IVA (IP2): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/AuxLaplaceIVA-IP2.ipynb) <br> Auxiliary-function-based Laplace-IVA (ISS1): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/AuxLaplaceIVA-ISS1.ipynb) <br> Auxiliary-function-based Laplace-IVA (ISS2): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/AuxLaplaceIVA-ISS2.ipynb) <br> Auxiliary-function-based Laplace-IVA (IPA): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/AuxLaplaceIVA-IPA.ipynb) <br> Gradient-descent-based Gauss-IVA: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/GradGaussIVA.ipynb) <br> Natural-gradient-descent-based Gauss-IVA: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/NaturalGradGaussIVA.ipynb) <br> Auxiliary-function-based Gauss-IVA (IP1): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/AuxGaussIVA-IP1.ipynb) <br> Auxiliary-function-based Gauss-IVA (IP2): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/AuxGaussIVA-IP2.ipynb) <br> Auxiliary-function-based Gauss-IVA (ISS1): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/AuxGaussIVA-ISS1.ipynb) <br> Auxiliary-function-based Gauss-IVA (ISS2): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/AuxGaussIVA-ISS2.ipynb) <br> Auxiliary-function-based Gauss-IVA (IPA): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IVA/AuxGaussIVA-IPA.ipynb) |
| Independent Low-Rank Matrix Analysis (ILRMA) [15-18] | Gauss-ILRMA (IP1/MM): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/GaussILRMA-IP1-MM.ipynb) <br> Gauss-ILRMA (IP1/ME): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/GaussILRMA-IP1-ME.ipynb) <br> Gauss-ILRMA (IP2/MM): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/GaussILRMA-IP2-MM.ipynb) <br> Gauss-ILRMA (IP2/ME): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/GaussILRMA-IP2-ME.ipynb) <br> Gauss-ILRMA (ISS1/MM): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/GaussILRMA-ISS1-MM.ipynb) <br> Gauss-ILRMA (ISS1/ME): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/GaussILRMA-ISS1-ME.ipynb) <br> Gauss-ILRMA (ISS2/MM): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/GaussILRMA-ISS2-MM.ipynb) <br> Gauss-ILRMA (ISS2/ME): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/GaussILRMA-ISS2-ME.ipynb) <br> Gauss-ILRMA (IPA/MM): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/GaussILRMA-IPA-MM.ipynb) <br> Gauss-ILRMA (IPA/ME): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/GaussILRMA-IPA-ME.ipynb) <br> *t*-ILRMA (IP1/MM): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/TILRMA-IP1-MM.ipynb) <br> *t*-ILRMA (IP1/ME): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/TILRMA-IP1-ME.ipynb) <br> *t*-ILRMA (IP2/MM): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/TILRMA-IP2-MM.ipynb) <br> *t*-ILRMA (IP2/ME): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/TILRMA-IP2-ME.ipynb) <br> *t*-ILRMA (ISS1/MM): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/TILRMA-ISS1-MM.ipynb) <br> *t*-ILRMA (ISS1/ME): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/TILRMA-ISS1-ME.ipynb) <br> *t*-ILRMA (ISS2/MM): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/TILRMA-ISS2-MM.ipynb) <br> *t*-ILRMA (ISS2/ME): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/TILRMA-ISS2-ME.ipynb) <br> GGD-ILRMA (IP1/MM): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/GGDILRMA-IP1-MM.ipynb) <br> GGD-ILRMA (IP2/MM): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/GGDILRMA-IP2-MM.ipynb) <br> GGD-ILRMA (ISS1/MM): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/GGDILRMA-ISS1-MM.ipynb) <br> GGD-ILRMA (ISS2/MM): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ILRMA/GGDILRMA-ISS2-MM.ipynb) |
| Independent Positive Semidefinite Tensor Analysis (IPSDTA) [19, 20] | Gauss-IPSDTA (VCD): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IPSDTA/GaussIPSDTA-VCD.ipynb) <br> *t*-IPSDTA (VCD): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/IPSDTA/TIPSDTA-VCD.ipynb) |
| Multichannel Nonnegative Matrix Factorization (MNMF) [21-24] | Gauss-MNMF: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/MNMF/GaussMNMF.ipynb) <br> *t*-MNMF: soon <br> Fast Gauss-MNMF (IP1): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/MNMF/FastGaussMNMF-IP1.ipynb) <br> Fast Gauss-MNMF (IP2): [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/MNMF/FastGaussMNMF-IP2.ipynb) |
| Blind Source Separation via Primal-Dual Splitting Algorithm (PDS-BSS) [25,26] | PDS-BSS: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/PDSBSS/PDSBSS.ipynb) <br> PDS-BSS-multiPenalty: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/PDSBSS/PDSBSS_multi-penalty.ipynb) <br> PDS-BSS-masking: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/PDSBSS/PDSBSS_masking.ipynb) |
| Blind Source Separation via Alternating Direction Method of Multipliers (ADMM-BSS) | ADMM-BSS: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/ADMMBSS/ADMMBSS.ipynb) |
| Harmonic Vector Analysis (HVA) [27] | HVA: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/HVA/HVA.ipynb) |
| Complex Angular Central Gaussian Mixture Model (cACGMM) [28] | cACGMM: [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tky823/ssspy/blob/main/notebooks/BSS/CACGMM/CACGMM.ipynb) |

- [1] [P. Comon, "Independent component analysis, a new concept?" Signal Processing, vol. 36, no. 3, pp. 287-314, 1994.](https://www.sciencedirect.com/science/article/pii/0165168494900299)
- [2] [S. Amari, A. Cichocki, and H. H. Yang, "A new learning algorithm forblind signal separation," in *Proc. NIPS*, 1996, pp. 757-763.](https://proceedings.neurips.cc/paper/1995/hash/e19347e1c3ca0c0b97de5fb3b690855a-Abstract.html)
- [3] [A. Hyvärinen, "Fast and robust fixed-point algorithms for independent component analysis," *IEEE Trans. on Neural Netw.*, vol. 10, no. 3, pp. 626-634, 1999.](https://www.cs.helsinki.fi/u/ahyvarin/papers/TNN99new.pdf)
- [4] [N. Murata, S. Ikeda, and A. Ziehe, "An approach to blind source separation based on temporal structure of speech signals," in *Neurocomputing*, vol. 41, no. 1, pp. 1-24, 2001](https://www.sciencedirect.com/science/article/pii/S0925231200003453)
- [5] [H. Sawada, S. Araki, and S. Makino, "Underdetermined convolutive blind source separation via frequency bin-wise clustering and permutation alignment," 2011.](https://ieeexplore.ieee.org/document/5473129)
- [6] [N. Ono and S. Miyabe, "Auxiliary-function-based independent componentanalysis for super-Gaussian sources," in *Proc. LVA/ICA*, 2010, pp. 165-172.](https://link.springer.com/chapter/10.1007/978-3-642-15995-4_21)
- [7] [T. Kim, T. Attias, S.-Y. Lee, and T.-W. Lee, "Blind source separation exploiting higher-order frequency dependencies," *IEEE trans. ASLP*, vol. 15, no.1, pp. 70-79, 2006.](https://link.springer.com/chapter/10.1007/11679363_21)
- [8] [I. Lee, T. Kim, and T.-W. Lee, "Fast fixed-point independent vector analysis algorithms for convolutive blind source separation," *Signal Processing*, vol. 87, no. 8, pp. 1859-1871, 2007.]()
- [9] [N. Ono, "Stable and fast update rules for independent vector analysis based on auxiliary function technique," in *Proc. WASPAA*, 2011, p.189-192.](https://ieeexplore.ieee.org/document/6082320)
- [10] [N. Ono, "Auxiliary-function-based independent vector analysis with power of vector-norm type weighting functions," in *Proc. APSIPA ASC*, 2012, pp. 1-4.](https://ieeexplore.ieee.org/document/6411886)
- [11] [R. Scheibler and N. Ono, "Fast and stable blind source separation with rank-1 updates," in *Proc. ICASSP*, 2020, pp. 236-240.](https://ieeexplore.ieee.org/document/9053556)
- [12] [A. Brendel and W. Kellermann, "Faster IVA: Update rules for independent vector analysis based on negentropy and the majorize-minimize principle," in *Proc. WASPAA*, 2021, pp. 131–135.](https://arxiv.org/abs/2003.09531)
- [13] [R. Scheibler, "Independent vector analysis via log-quadratically penalized quadratic minimization," *IEEE Trans. Signal Processing*, vol. 69, pp. 2509-2524, 2021.](https://ieeexplore.ieee.org/document/9399809)
- [14] [R. Ikeshita and T. Nakatani, "ISS2: An extension of iterative source steering algorithm for majorization-minimization-based independent vector analysis," in *Proc. EUSIPCO*, 2022, pp. 65-69.](https://arxiv.org/abs/2202.00875)
- [15] [D. Kitamura, N. Ono, H. Sawada, H. Kameoka, and H. Saruwatari, "Determined blind source separation unifying independent vector analysis and nonnegative matrix factorization," *IEEE/ACM Trans. ASLP*, vol. 24, no. 9, pp. 1626-1641, 2016.](https://ieeexplore.ieee.org/document/7486081)
- [16] [D. Kitamura, S. Mogami, Y. Mitsui, N. Takamune, H. Saruwatari, N. Ono, Y. Takahashi, and K. Kondo, "Generalized independent low-rank matrix analysis using heavy-tailed distributions for blind source separation," *EURASIP J. Adv. in Signal Processing*, vol. 2018, no. 28, 25 pages, 2018.](https://link.springer.com/article/10.1186/s13634-018-0549-5)
- [17] [T. Nakashima, R. Scheibler, Y. Wakabayashi, and N. Ono, "Faster independent low-rank matrix analysis with pairwise updates of demixing vectors," in *Proc. EUSIPCO*, 2021, pp. 301-305.](https://ieeexplore.ieee.org/document/9287508)
- [18] [Y. Mitsui, D. Kitamura, N. Takamune, H. Saruwatari, Y. Takahashi, K. Kondo, "Independent low-rank matrix analysis based on parametric majorization-equalization algorithm", in *Proc. CAMSAP*, 2017, pp. 98-102.](https://arxiv.org/abs/1710.01589)
- [19] [R. Ikeshita, "Independent positive semidefinite tensor analysis in blind source separation," in *Proc. EUSIPCO*, 2018, pp. 1652-1656.](https://ieeexplore.ieee.org/document/8553546)
- [20] [T. Kondo, K. Fukushige, N. Takamune, D. Kitamura, H. Saruwatari, R. Ikeshita, and T. Nakatani, "Convergence-guaranteed independent positive semidefinite tensor analysis based on Student's t distribution," in *Proc ICASSP*, 2020, pp. 681-685.](https://ieeexplore.ieee.org/document/9054150)
- [21] [A. Ozerov and C. Fevotte, "Multichannel nonnegative matrix factorization in convolutive mixtures for audio source separation," *IEEE Trans. ASLP*, vol. 18, no. 3, pp. 550-563, 2010.](https://ieeexplore.ieee.org/document/5229304)
- [22] [H. Sawada, H. Kameoka, S. Araki, and N. Ueda, "Multichannel extensions of non-negative matrix factorization with complex-valued data," *IEEE Trans. ASLP*, vol. 21, no. 5, pp. 971-982, 2013.](https://ieeexplore.ieee.org/document/6410389)
- [23] [K. Yoshii, K. Itoyama, and M. Goto, "Student's T nonnegative matrix factorization and positive semidefinite tensor factorization for single-channel audio source separation," in *Proc. ICASSP*, 2016, pp. 51-55.](https://ieeexplore.ieee.org/document/7471635)
- [24] [K. Sekiguchi, A. A. Nugraha, Y. Bando, and K. Yoshii, "Fast multichannel source separation based on jointly diagonalizable spatial covariance matrices," in *Proc. EUSIPCO*, 2019, pp. 1-5.](https://arxiv.org/abs/1903.03237)
- [25] [K. Yatabe and D. Kitamura, "Determined blind source separation via proximal splitting algorithm," in *Proc. ICASSP*, 2018, pp. 776-780.](https://ieeexplore.ieee.org/document/8462338)
- [26] [K. Yatabe and D. Kitamura, "Time-frequency-masking-based determined BSS with application to sparse IVA," in *Proc. ICASSP*, 2019, pp. 715-719.](https://ieeexplore.ieee.org/document/8682217)
- [27] [K. Yatabe and D. Kitamura, "Determined BSS based on time-frequency masking and its application to harmonic vector analysis," *IEEE/ACM Trans. ASLP*, vol. 29, pp. 1609–1625, 2021.](https://dl.acm.org/doi/abs/10.1109/TASLP.2021.3073863)
- [28] [N. Ito, S. Araki, and T. Nakatani, "Complex angular central Gaussian mixture model for directional statistics in mask-based microphone array signal processing," in *Proc. EUSIPCO*, 2016, pp. 1153-1157.](https://ieeexplore.ieee.org/document/7760429)

## LICENSE
Apache License 2.0


================================================
FILE: codecov.yaml
================================================
coverage:
  status:
    project:
      default:
        target: auto
        threshold: 1%
    patch:
      default:
        target: auto
        threshold: 5%


================================================
FILE: docs/Makefile
================================================
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS    ?=
SPHINXBUILD   ?= sphinx-build
SOURCEDIR     = .
BUILDDIR      = _build

# Put it first so that "make" without argument is like "make help".
help:
	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)


================================================
FILE: docs/api.rst
================================================
APIs
====

Introduction
------------

.. code-block:: python

   import numpy as np
   import scipy.signal as ss
   import IPython.display as ipd
   import matplotlib.pyplot as plt

   from ssspy.utils.dataset import download_sample_speech_data
   from ssspy.transform import whiten
   from ssspy.algorithm import projection_back
   from ssspy.bss.fdica import AuxFDICA

   n_fft, hop_length = 4096, 2048
   window = "hann"

   waveform_src_img = download_sample_speech_data(n_sources=3)
   waveform_mix = np.sum(waveform_src_img, axis=1)
   _, _, spectrogram_mix = ss.stft(
      waveform_mix,
      window=window,
      nperseg=n_fft,
      noverlap=n_fft-hop_length
   )
   _, _, spectrogram_mix = ss.stft(
      waveform_mix,
      window=window,
      nperseg=n_fft,
      noverlap=n_fft-hop_length
   )

   def contrast_fn(y):
    return 2 * np.abs(y)

   def d_contrast_fn(y):
      return 2 * np.ones_like(y)

   fdica = AuxFDICA(
      contrast_fn=contrast_fn,
      d_contrast_fn=d_contrast_fn,
   )
   spectrogram_mix_whitened = whiten(spectrogram_mix)
   spectrogram_est = fdica(spectrogram_mix_whitened)
   spectrogram_est = projection_back(spectrogram_est, reference=spectrogram_mix)

   _, waveform_est = ss.istft(
      spectrogram_est,
      window=window,
      nperseg=n_fft,
      noverlap=n_fft-hop_length
   )

   for idx, waveform in enumerate(waveform_est):
      print("Estimated source: {}".format(idx + 1))
      ipd.display(ipd.Audio(waveform, rate=16000))
      print()

   plt.figure()
   plt.plot(fdica.loss)
   plt.show()

Submodules
----------

.. toctree::
   :maxdepth: 1

   ssspy.bss
   ssspy.algorithm
   ssspy.transform
   ssspy.linalg
   ssspy.special


================================================
FILE: docs/changelog.rst
================================================
.. include:: ../CHANGELOG.rst


================================================
FILE: docs/conf.py
================================================
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = "ssspy"
copyright = "2022, Takuya Hasumi"
author = "Takuya Hasumi"


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
    "sphinx.ext.autodoc",
    "sphinx.ext.napoleon",
    "sphinx_autodoc_typehints",
    "nbsphinx",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
#
html_theme = "furo"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ["_static"]


================================================
FILE: docs/index.rst
================================================
.. ssspy documentation master file, created by
   sphinx-quickstart on Fri Apr 29 20:59:12 2022.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

Welcome to ssspy's documentation!
=================================

.. image:: https://readthedocs.org/projects/sound-source-separation-python/badge/?version=latest
   :target: https://sound-source-separation-python.readthedocs.io/en/latest/?badge=latest

.. image:: https://github.com/tky823/ssspy/actions/workflows/lint.yaml/badge.svg
   :target: https://github.com/tky823/ssspy/actions/workflows/lint.yaml

.. image:: https://codecov.io/gh/tky823/ssspy/branch/main/graph/badge.svg?token=IZ89MTV64G
   :target: https://codecov.io/gh/tky823/ssspy

``ssspy`` is a Python toolkit for sound source separation.

Build status
------------

+--------+--------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
| Python | Ubuntu                                                                                                                         | MacOS (x86_64)                                                                                                            | MacOS (arm64)                                                                                                                 | Windows                                                                                                                         |
+--------+--------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
| 3.9    | .. image:: https://github.com/tky823/ssspy/actions/workflows/test_package_ubuntu-latest_python-3.9.yaml/badge.svg?branch=main  | .. image:: https://github.com/tky823/ssspy/actions/workflows/test_package_macos-13_python-3.9.yaml/badge.svg?branch=main  | .. image:: https://github.com/tky823/ssspy/actions/workflows/test_package_macos-latest_python-3.9.yaml/badge.svg?branch=main  | .. image:: https://github.com/tky823/ssspy/actions/workflows/test_package_windows-latest_python-3.9.yaml/badge.svg?branch=main  |
|        |    :target: https://github.com/tky823/ssspy/actions/workflows/test_package_ubuntu-latest_python-3.9.yaml                       |    :target: https://github.com/tky823/ssspy/actions/workflows/test_package_macos-13_python-3.9.yaml                       |    :target: https://github.com/tky823/ssspy/actions/workflows/test_package_macos-latest_python-3.9.yaml                       |    :target: https://github.com/tky823/ssspy/actions/workflows/test_package_windows-latest_python-3.9.yaml                       |
+--------+--------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------+
| 3.10   | .. image:: https://github.com/tky823/ssspy/actions/workflows/test_package_ubuntu-latest_python-3.10.yaml/badge.svg?branch=main | .. image:: https://github.com/tky823/ssspy/actions/workflows/test_package_macos-13_python-3.10.yaml/badge.svg?branch=main | .. image:: https://github.com/tky823/ssspy/actions/workflows/test_package_macos-latest_python-3.10.yaml/badge.svg?branch=main | .. image:: https://github.com/tky823/ssspy/actions/workflows/test_package_windows-latest_python-3.10.yaml/badge.svg?branch=main |
|        |    :target: https://github.com/tky823/ssspy/actions/workflows/test_package_ubuntu-latest_python-3.10.yaml                      |    :target: https://github.com/tky823/ssspy/actions/workflows/test_package_macos-13_python-3.10.yaml                      |    :target: https://github.com/tky823/ssspy/actions/workflows/test_package_macos-latest_python-3.10.yaml                      |    :target: https://github.com/tky823/ssspy/actions/workflows/test_package_windows-latest_python-3.10.yaml                      |
+--------+--------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------+
| 3.11   | .. image:: https://github.com/tky823/ssspy/actions/workflows/test_package_ubuntu-latest_python-3.11.yaml/badge.svg?branch=main | .. image:: https://github.com/tky823/ssspy/actions/workflows/test_package_macos-13_python-3.11.yaml/badge.svg?branch=main | .. image:: https://github.com/tky823/ssspy/actions/workflows/test_package_macos-latest_python-3.11.yaml/badge.svg?branch=main | .. image:: https://github.com/tky823/ssspy/actions/workflows/test_package_windows-latest_python-3.11.yaml/badge.svg?branch=main |
|        |    :target: https://github.com/tky823/ssspy/actions/workflows/test_package_ubuntu-latest_python-3.11.yaml                      |    :target: https://github.com/tky823/ssspy/actions/workflows/test_package_macos-13_python-3.11.yaml                      |    :target: https://github.com/tky823/ssspy/actions/workflows/test_package_macos-latest_python-3.11.yaml                      |    :target: https://github.com/tky823/ssspy/actions/workflows/test_package_windows-latest_python-3.11.yaml                      |
+--------+--------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------+
| 3.12   | .. image:: https://github.com/tky823/ssspy/actions/workflows/test_package_ubuntu-latest_python-3.12.yaml/badge.svg?branch=main | .. image:: https://github.com/tky823/ssspy/actions/workflows/test_package_macos-13_python-3.12.yaml/badge.svg?branch=main | .. image:: https://github.com/tky823/ssspy/actions/workflows/test_package_macos-latest_python-3.12.yaml/badge.svg?branch=main | .. image:: https://github.com/tky823/ssspy/actions/workflows/test_package_windows-latest_python-3.12.yaml/badge.svg?branch=main |
|        |    :target: https://github.com/tky823/ssspy/actions/workflows/test_package_ubuntu-latest_python-3.12.yaml                      |    :target: https://github.com/tky823/ssspy/actions/workflows/test_package_macos-13_python-3.12.yaml                      |    :target: https://github.com/tky823/ssspy/actions/workflows/test_package_macos-latest_python-3.12.yaml                      |    :target: https://github.com/tky823/ssspy/actions/workflows/test_package_windows-latest_python-3.12.yaml                      |
+--------+--------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------+

Installation
------------

You can install ``ssspy`` by pip.

.. code-block:: shell

   pip install ssspy

To install latest version,

.. code-block:: shell

   pip install git+https://github.com/tky823/ssspy.git

Instead, you can build package from source.

.. code-block:: shell

   git clone https://github.com/tky823/ssspy.git
   cd ssspy
   pip install -e .

.. note::

   If you fail to install ``ssspy``, please update ``setuptools`` by

   .. code-block:: shell

      python -m pip install --upgrade setuptools

.. note::

   If you cannot install `ssspy` due to failure in building wheel for numpy, please install numpy in advance.
   
Build Documentation Locally (optional)
--------------------------------------
To build the documentation locally, you have to include ``docs`` and ``notebooks`` when installing ``ssspy``.

.. code-block:: shell

   pip install -e ".[docs,notebooks]"

You need to convert some notebooks by the following command:

.. code-block:: shell

   . ./docs/pre_build.sh

When you build the documentation, run the following command.

.. code-block:: shell

   cd docs/
   make html

Or, you can build the documentation automatically using ``sphinx-autobuild``.

.. code-block:: shell

   # in ssspy/
   sphinx-autobuild docs docs/_build/html

.. toctree::
   :maxdepth: 1
   :caption: Contents:

   _notebooks/Getting-Started.rst
   changelog
   api


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`


================================================
FILE: docs/make.bat
================================================
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
	set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
	echo.
	echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
	echo.installed, then set the SPHINXBUILD environment variable to point
	echo.to the full path of the 'sphinx-build' executable. Alternatively you
	echo.may add the Sphinx directory to PATH.
	echo.
	echo.If you don't have Sphinx installed, grab it from
	echo.https://www.sphinx-doc.org/
	exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd


================================================
FILE: docs/pre_build.sh
================================================
#!/bin/bash

# TODO: unify .readthedocs.yaml
pip install -e ".[docs,notebooks]"

# convert .ipynb to .rst format.
jupyter nbconvert --execute notebooks/Examples/Getting-Started.ipynb --to notebook --output-dir docs/_notebooks/


================================================
FILE: docs/ssspy.algorithm.rst
================================================
ssspy.algorithm
===============

``ssspy.algorithm`` provides algorithms related to source separation.

Algorithms
~~~~~~~~~~
.. autofunction:: ssspy.algorithm.projection_back


================================================
FILE: docs/ssspy.bss.admmbss.rst
================================================
ssspy.bss.admmbss
=================

Algorithms
~~~~~~~~~~
.. autoclass:: ssspy.bss.admmbss.ADMMBSSBase

.. autoclass:: ssspy.bss.admmbss.ADMMBSS
   :special-members: __call__
   :members: update_once


================================================
FILE: docs/ssspy.bss.base.rst
================================================
ssspy.bss.base
==============

In this module, we provide base class of blind source separation methods.

Algorithms
~~~~~~~~~~

.. autoclass:: ssspy.bss.base.IterativeMethodBase
   :special-members: __call__
   :members:
   :undoc-members:


================================================
FILE: docs/ssspy.bss.cacgmm.rst
================================================
ssspy.bss.cacgmm
================

Algorithms
~~~~~~~~~~
.. autoclass:: ssspy.bss.cacgmm.CACGMM
    :special-members: __call__
    :members:
        separate, normalize_covariance,
        update_once, update_posterior, update_parameters,
        compute_loss, solve_permutation


================================================
FILE: docs/ssspy.bss.fdica.rst
================================================
ssspy.bss.fdica
===============

In this module, we separate multichannel signals
using frequency-domain independent component analysis (FDICA).
We denote the number of sources and microphones as :math:`N` and :math:`M`, respectively.
We also denote short-time Fourier transforms of source, observed, and separated signals
as :math:`\boldsymbol{s}_{ij}`, :math:`\boldsymbol{x}_{ij}`, and :math:`\boldsymbol{y}_{ij}`,
respectively.

.. math::
   \boldsymbol{s}_{ij}
   &= (s_{ij1},\ldots,s_{ijn},\ldots,s_{ijN})^{\mathsf{T}}\in\mathbb{C}^{N}, \\
   \boldsymbol{x}_{ij}
   &= (x_{ij1},\ldots,x_{ijm},\ldots,x_{ijM})^{\mathsf{T}}\in\mathbb{C}^{M}, \\
   \boldsymbol{y}_{ij}
   &= (y_{ij1},\ldots,y_{ijn},\ldots,y_{ijN})^{\mathsf{T}}\in\mathbb{C}^{N},

where :math:`i=1,\ldots,I` and :math:`j=1,\ldots,J` are indices of frequency bins and time frames, respectively.
When a mixing system is time-invariant, :math:`\boldsymbol{x}_{ij}` is represented as follows:

.. math::
   \boldsymbol{x}_{ij}
   = \boldsymbol{A}_{i}\boldsymbol{s}_{ij},

where :math:`\boldsymbol{A}_{i}=(\boldsymbol{a}_{i1},\ldots,\boldsymbol{a}_{in},\ldots,\boldsymbol{a}_{iN})\in\mathbb{C}^{M\times N}` is
a mixing matrix.
If :math:`M=N` and :math:`\boldsymbol{A}_{i}` is non-singular, a demixing system is represented as

.. math::
   \boldsymbol{y}_{ij}
   = \boldsymbol{W}_{i}\boldsymbol{x}_{ij},

where :math:`\boldsymbol{W}_{i}=(\boldsymbol{w}_{i1},\ldots,\boldsymbol{w}_{in},\ldots,\boldsymbol{w}_{iN})^{\mathsf{H}}\in\mathbb{C}^{N\times M}` is
a demixing matrix.
The negative log-likelihood of observed signals (divided by :math:`J`) is computed as follows:

.. math::
   \mathcal{L}
   &= -\frac{1}{J}\log p(\mathcal{X}) \\
   &= -\frac{1}{J}\left(\log p(\mathcal{Y}) \
   + \sum_{i}\log|\det\boldsymbol{W}_{i}|^{2J} \right) \\
   &= -\frac{1}{J}\sum_{i,j,n}\log p(y_{ijn})
   - 2\sum_{i}\log|\det\boldsymbol{W}_{i}| \\
   &= \sum_{i}\mathcal{L}^{[i]}, \\
   \mathcal{L}^{[i]} \
   &= \frac{1}{J}\sum_{j,n}G(y_{ijn})
   - 2\log|\det\boldsymbol{W}_{i}|, \\
   G(y_{ijn})
   &= -\log p(y_{ijn}),

where :math:`G(y_{ijn})` is a contrast function.
The derivative of :math:`G(y_{ijn})` is called a score function.

.. math::
   \phi(y_{ijn})
   = \frac{\partial G(y_{ijn})}{\partial y_{ijn}^{*}}.

Algorithms
~~~~~~~~~~

.. autoclass:: ssspy.bss.fdica.FDICABase
   :special-members: __call__
   :members: separate,
      compute_loss, compute_logdet,
      restore_scale, apply_projection_back,
      solve_permutation

.. autoclass:: ssspy.bss.fdica.GradFDICABase
   :special-members: __call__

.. autoclass:: ssspy.bss.fdica.GradFDICA
   :members: update_once

.. autoclass:: ssspy.bss.fdica.NaturalGradFDICA
   :members: update_once

.. autoclass:: ssspy.bss.fdica.AuxFDICA
   :special-members: __call__
   :members: update_once, update_once_ip1, update_once_ip2

.. autoclass:: ssspy.bss.fdica.GradLaplaceFDICA

.. autoclass:: ssspy.bss.fdica.NaturalGradLaplaceFDICA

.. autoclass:: ssspy.bss.fdica.AuxLaplaceFDICA


================================================
FILE: docs/ssspy.bss.hva.rst
================================================
ssspy.bss.hva
=============

Algorithms
~~~~~~~~~~
.. autoclass:: ssspy.bss.hva.MaskingPDSHVA

.. autoclass:: ssspy.bss.hva.MaskingADMMHVA

.. autoclass:: ssspy.bss.hva.HVA


================================================
FILE: docs/ssspy.bss.ica.rst
================================================
ssspy.bss.ica
=============

In this module, we separate time-domain multichannel signals
using independent component analysis (ICA) [#comon1994independent]_.
We denote the number of sources and microphones as :math:`N` and :math:`M`, respectively.
We also denote source, observed, and separated signals (in time-domain)
as :math:`\boldsymbol{s}_{t}`, :math:`\boldsymbol{x}_{t}`, and :math:`\boldsymbol{y}_{t}`,
respectively.

.. math::
   \boldsymbol{s}_{t}
   &= (s_{t1},\ldots,s_{tn},\ldots,s_{tN})^{\mathsf{T}}\in\mathbb{R}^{N}, \\
   \boldsymbol{x}_{t}
   &= (x_{t1},\ldots,x_{tm},\ldots,x_{tM})^{\mathsf{T}}\in\mathbb{R}^{M}, \\
   \boldsymbol{y}_{t}
   &= (y_{t1},\ldots,y_{tn},\ldots,y_{tN})^{\mathsf{T}}\in\mathbb{R}^{N},

where :math:`t=1,\ldots,T` is an index of time samples.
When a mixing system is time-invariant, :math:`\boldsymbol{x}_{t}` is represented as follows:

.. math::
   \boldsymbol{x}_{t}
   = \boldsymbol{A}\boldsymbol{s}_{t},

where :math:`\boldsymbol{A}=(\boldsymbol{a}_{1},\ldots,\boldsymbol{a}_{n},\ldots,\boldsymbol{a}_{N})\in\mathbb{R}^{M\times N}` is
a mixing matrix.
If :math:`M=N` and :math:`\boldsymbol{A}` is non-singular, a demixing system is represented as

.. math::
   \boldsymbol{y}_{t}
   = \boldsymbol{W}\boldsymbol{x}_{t},

where :math:`\boldsymbol{W}=(\boldsymbol{w}_{1},\ldots,\boldsymbol{w}_{n},\ldots,\boldsymbol{w}_{N})^{\mathsf{T}}\in\mathbb{R}^{N\times M}` is
a demixing matrix.
The negative log-likelihood of observed signals (divided by :math:`T`) is computed as follows:

.. math::
   \mathcal{L}
   &= -\frac{1}{T}\log p(\mathcal{X}) \\
   &= -\frac{1}{T}\left(\log p(\mathcal{Y}) \
   + \log|\det\boldsymbol{W}|^{T} \right) \\
   &= -\frac{1}{T}\sum_{t,n}\log p(y_{tn})
   - \log|\det\boldsymbol{W}| \\
   &= \frac{1}{T}\sum_{t,n}G(y_{tn})
   - \log|\det\boldsymbol{W}|, \\
   G(y_{tn})
   &= -\log p(y_{tn}),

where :math:`G(y_{tn})` is a contrast function.
The derivative of :math:`G(y_{tn})` is called a score function.

.. math::
   \phi(y_{tn})
   = \frac{\partial G(y_{tn})}{\partial y_{ijn}}.

.. [#comon1994independent] P. Comon,
   "Independent component analysis, a new concept?"
   *Signal Processing*, vol. 36, no. 3, pp. 287-314, 1994.

Algorithms
~~~~~~~~~~

.. autoclass:: ssspy.bss.ica.GradICABase
   :special-members: __call__
   :members: separate, compute_loss, compute_logdet

.. autoclass:: ssspy.bss.ica.FastICABase
   :special-members: __call__
   :members: separate, compute_loss

.. autoclass:: ssspy.bss.ica.GradICA
   :members: update_once

.. autoclass:: ssspy.bss.ica.NaturalGradICA
   :members: update_once

.. autoclass:: ssspy.bss.ica.FastICA
   :members: update_once

.. autoclass:: ssspy.bss.ica.GradLaplaceICA
   :members: update_once, compute_loss

.. autoclass:: ssspy.bss.ica.NaturalGradLaplaceICA
   :members: update_once, compute_loss


================================================
FILE: docs/ssspy.bss.ilrma.rst
================================================
ssspy.bss.ilrma
===============

In this module, we separate multichannel signals
using independent low-rank matrix analysis (ILRMA).
We denote the number of sources and microphones as :math:`N` and :math:`M`, respectively.
We also denote short-time Fourier transforms of source, observed, and separated signals
as :math:`\boldsymbol{s}_{ij}`, :math:`\boldsymbol{x}_{ij}`, and :math:`\boldsymbol{y}_{ij}`,
respectively.

.. math::
   \boldsymbol{s}_{ij}
   &= (s_{ij1},\ldots,s_{ijn},\ldots,s_{ijN})^{\mathsf{T}}\in\mathbb{C}^{N}, \\
   \boldsymbol{x}_{ij}
   &= (x_{ij1},\ldots,x_{ijm},\ldots,x_{ijM})^{\mathsf{T}}\in\mathbb{C}^{M}, \\
   \boldsymbol{y}_{ij}
   &= (y_{ij1},\ldots,y_{ijn},\ldots,y_{ijN})^{\mathsf{T}}\in\mathbb{C}^{N},

where :math:`i=1,\ldots,I` and :math:`j=1,\ldots,J` are indices of frequency bins and time frames, respectively.
When a mixing system is time-invariant, :math:`\boldsymbol{x}_{ij}` is represented as follows:

.. math::
   \boldsymbol{x}_{ij}
   = \boldsymbol{A}_{i}\boldsymbol{s}_{ij},

where :math:`\boldsymbol{A}_{i}=(\boldsymbol{a}_{i1},\ldots,\boldsymbol{a}_{in},\ldots,\boldsymbol{a}_{iN})\in\mathbb{C}^{M\times N}` is
a mixing matrix.
If :math:`M=N` and :math:`\boldsymbol{A}_{i}` is non-singular, a demixing system is represented as

.. math::
   \boldsymbol{y}_{ij}
   = \boldsymbol{W}_{i}\boldsymbol{x}_{ij},

where :math:`\boldsymbol{W}_{i}=(\boldsymbol{w}_{i1},\ldots,\boldsymbol{w}_{in},\ldots,\boldsymbol{w}_{iN})^{\mathsf{H}}\in\mathbb{C}^{N\times M}` is
a demixing matrix.
The negative log-likelihood of observed signals (divided by :math:`J`) is computed as follows:

.. math::
   \mathcal{L}
   &= -\frac{1}{J}\log p(\mathcal{X}) \\
   &= -\frac{1}{J}\left(\log p(\mathcal{Y}) \
   + \sum_{i}\log|\det\boldsymbol{W}_{i}|^{2J} \right) \\
   &= -\frac{1}{J}\sum_{i,j,n}\log p(y_{ijn})
   - 2\sum_{i}\log|\det\boldsymbol{W}_{i}|.

Algorithms
~~~~~~~~~~
.. autoclass:: ssspy.bss.ilrma.ILRMABase
   :special-members: __call__
   :members:
      _init_nmf, separate, reconstruct_nmf, update_once,
      normalize, normalize_by_power, normalize_by_projection_back,
      compute_loss, compute_logdet, restore_scale, apply_projection_back

.. autoclass:: ssspy.bss.ilrma.GaussILRMA
   :special-members: __call__
   :members:
      update_once,
      update_source_model, update_source_model_mm, update_source_model_me,
      update_latent_mm, update_basis_mm, update_activation_mm,
      update_latent_me, update_basis_me, update_activation_me,
      update_spatial_model, update_spatial_model_ip1, update_spatial_model_ip2, update_spatial_model_iss1, update_spatial_model_iss2, update_spatial_model_ipa,
      compute_loss, apply_projection_back

.. autoclass:: ssspy.bss.ilrma.TILRMA
   :special-members: __call__
   :members:
      update_once,
      update_source_model, update_source_model_mm, update_source_model_me,
      update_latent_mm, update_basis_mm, update_activation_mm,
      update_latent_me, update_basis_me, update_activation_me,
      update_spatial_model, update_spatial_model_ip1, update_spatial_model_ip2, update_spatial_model_iss1, update_spatial_model_iss2,
      compute_loss, apply_projection_back

.. autoclass:: ssspy.bss.ilrma.GGDILRMA
   :special-members: __call__
   :members:
      update_once,
      update_source_model, update_source_model_mm,
      update_latent_mm, update_basis_mm, update_activation_mm,
      update_spatial_model, update_spatial_model_ip1, update_spatial_model_ip2, update_spatial_model_iss1, update_spatial_model_iss2,
      compute_loss, apply_projection_back


================================================
FILE: docs/ssspy.bss.iva.rst
================================================
ssspy.bss.iva
=============

In this module, we separate multichannel signals
using independent vector analysis (IVA).
We denote the number of sources and microphones as :math:`N` and :math:`M`, respectively.
We also denote short-time Fourier transforms of source, observed, and separated signals
as :math:`\boldsymbol{s}_{ij}`, :math:`\boldsymbol{x}_{ij}`, and :math:`\boldsymbol{y}_{ij}`,
respectively.

.. math::
   \boldsymbol{s}_{ij}
   &= (s_{ij1},\ldots,s_{ijn},\ldots,s_{ijN})^{\mathsf{T}}\in\mathbb{C}^{N}, \\
   \boldsymbol{x}_{ij}
   &= (x_{ij1},\ldots,x_{ijm},\ldots,x_{ijM})^{\mathsf{T}}\in\mathbb{C}^{M}, \\
   \boldsymbol{y}_{ij}
   &= (y_{ij1},\ldots,y_{ijn},\ldots,y_{ijN})^{\mathsf{T}}\in\mathbb{C}^{N},

where :math:`i=1,\ldots,I` and :math:`j=1,\ldots,J` are indices of frequency bins and time frames, respectively.
We also define the following vector:

.. math::
   \vec{\boldsymbol{y}}_{jn}
   = (y_{1jn},\ldots,y_{ijn},\ldots,y_{Ijn})^{\mathsf{T}}\in\mathbb{C}^{I}.

When a mixing system is time-invariant, :math:`\boldsymbol{x}_{ij}` is represented as follows:

.. math::
   \boldsymbol{x}_{ij}
   = \boldsymbol{A}_{i}\boldsymbol{s}_{ij},

where :math:`\boldsymbol{A}_{i}=(\boldsymbol{a}_{i1},\ldots,\boldsymbol{a}_{in},\ldots,\boldsymbol{a}_{iN})\in\mathbb{C}^{M\times N}` is
a mixing matrix.
If :math:`M=N` and :math:`\boldsymbol{A}_{i}` is non-singular, a demixing system is represented as

.. math::
   \boldsymbol{y}_{ij}
   = \boldsymbol{W}_{i}\boldsymbol{x}_{ij},

where :math:`\boldsymbol{W}_{i}=(\boldsymbol{w}_{i1},\ldots,\boldsymbol{w}_{in},\ldots,\boldsymbol{w}_{iN})^{\mathsf{H}}\in\mathbb{C}^{N\times M}` is
a demixing matrix.
The negative log-likelihood of observed signals (divided by :math:`J`) is computed as follows:

.. math::
   \mathcal{L}
   &= -\frac{1}{J}\log p(\mathcal{X}) \\
   &= -\frac{1}{J}\left(\log p(\mathcal{Y}) \
   + \sum_{i}\log|\det\boldsymbol{W}_{i}|^{2J} \right) \\
   &= -\frac{1}{J}\sum_{j,n}\log p(\vec{\boldsymbol{y}}_{jn})
   - 2\sum_{i}\log|\det\boldsymbol{W}_{i}| \\
   &= \frac{1}{J}\sum_{j,n}G(\vec{\boldsymbol{y}}_{jn})
   - 2\sum_{i}\log|\det\boldsymbol{W}_{i}|, \\
   G(\vec{\boldsymbol{y}}_{jn})
   &= -\log p(\vec{\boldsymbol{y}}_{jn}),

where :math:`G(\vec{\boldsymbol{y}}_{jn})` is a contrast function.
The derivative of :math:`G(\vec{\boldsymbol{y}}_{jn})` is called a score function.

.. math::
   \phi_{i}(\vec{\boldsymbol{y}}_{jn})
   = \frac{\partial G(\vec{\boldsymbol{y}}_{jn})}{\partial y_{ijn}^{*}}.

Algorithms
~~~~~~~~~~
.. autoclass:: ssspy.bss.iva.IVABase
   :special-members: __call__
   :members: separate, update_once, compute_loss, compute_logdet, restore_scale, apply_projection_back

.. autoclass:: ssspy.bss.iva.GradIVABase

.. autoclass:: ssspy.bss.iva.FastIVABase
   :members: separate, compute_loss, apply_projection_back

.. autoclass:: ssspy.bss.iva.AuxIVABase
   :special-members: __call__
   :members: separate, compute_loss, apply_projection_back

.. autoclass:: ssspy.bss.iva.GradIVA
   :members: update_once

.. autoclass:: ssspy.bss.iva.NaturalGradIVA
   :members: update_once

.. autoclass:: ssspy.bss.iva.FastIVA
   :special-members: __call__
   :members: update_once

.. autoclass:: ssspy.bss.iva.FasterIVA
   :special-members: __call__
   :members: update_once

.. autoclass:: ssspy.bss.iva.AuxIVA
   :special-members: __call__
   :members: update_once, update_once_ip1, update_once_ip2, update_once_iss1, update_once_iss2, update_once_ipa

.. autoclass:: ssspy.bss.iva.GradLaplaceIVA
   :members: update_once, compute_loss

.. autoclass:: ssspy.bss.iva.GradGaussIVA
   :members: update_once, update_source_model

.. autoclass:: ssspy.bss.iva.NaturalGradLaplaceIVA
   :members: update_once, compute_loss

.. autoclass:: ssspy.bss.iva.NaturalGradGaussIVA
   :members: update_once, compute_loss

.. autoclass:: ssspy.bss.iva.AuxLaplaceIVA

.. autoclass:: ssspy.bss.iva.AuxGaussIVA
   :members: update_once, update_source_model


================================================
FILE: docs/ssspy.bss.mnmf.rst
================================================
ssspy.bss.mnmf
==============


Algorithms
~~~~~~~~~~
.. autoclass:: ssspy.bss.mnmf.FastMNMFBase
    :special-members: __call__
    :members: normalize, normalize_by_power

.. autoclass:: ssspy.bss.mnmf.FastGaussMNMF
    :special-members: __call__
    :members: separate,
        compute_loss, compute_logdet,
        update_once, update_basis, update_activation, update_diagonalizer, update_spatial,
        update_diagonalizer_ip1, update_diagonalizer_ip2


================================================
FILE: docs/ssspy.bss.pdsbss.rst
================================================
ssspy.bss.pdsbss
================

In this module, we separate multichannel signals
using blind source separation via primal dual splitting algorithm.
We denote the number of sources and microphones as :math:`N` and :math:`M`, respectively.
We also denote short-time Fourier transforms of source, observed, and separated signals
as :math:`\boldsymbol{s}_{ij}`, :math:`\boldsymbol{x}_{ij}`, and :math:`\boldsymbol{y}_{ij}`,
respectively.

.. math::
   \boldsymbol{s}_{ij}
   &= (s_{ij1},\ldots,s_{ijn},\ldots,s_{ijN})^{\mathsf{T}}\in\mathbb{C}^{N}, \\
   \boldsymbol{x}_{ij}
   &= (x_{ij1},\ldots,x_{ijm},\ldots,x_{ijM})^{\mathsf{T}}\in\mathbb{C}^{M}, \\
   \boldsymbol{y}_{ij}
   &= (y_{ij1},\ldots,y_{ijn},\ldots,y_{ijN})^{\mathsf{T}}\in\mathbb{C}^{N},

where :math:`i=1,\ldots,I` and :math:`j=1,\ldots,J` are indices of frequency bins and time frames, respectively.
When a mixing system is time-invariant, :math:`\boldsymbol{x}_{ij}` is represented as follows:

.. math::
   \boldsymbol{x}_{ij}
   = \boldsymbol{A}_{i}\boldsymbol{s}_{ij},

where :math:`\boldsymbol{A}_{i}=(\boldsymbol{a}_{i1},\ldots,\boldsymbol{a}_{in},\ldots,\boldsymbol{a}_{iN})\in\mathbb{C}^{M\times N}` is
a mixing matrix.
If :math:`M=N` and :math:`\boldsymbol{A}_{i}` is non-singular, a demixing system is represented as

.. math::
   \boldsymbol{y}_{ij}
   = \boldsymbol{W}_{i}\boldsymbol{x}_{ij},

where :math:`\boldsymbol{W}_{i}=(\boldsymbol{w}_{i1},\ldots,\boldsymbol{w}_{in},\ldots,\boldsymbol{w}_{iN})^{\mathsf{H}}\in\mathbb{C}^{N\times M}` is
a demixing matrix.
The negative log-likelihood of observed signals (divided by :math:`2J`) is computed as follows:

.. math::
   \mathcal{L}
   &= \mathcal{P}(\mathcal{V}(\mathcal{Y}))
   + \sum_{i}\mathcal{I}(\boldsymbol{W}_{i}), \\
   \mathcal{V}(\mathcal{Y})
   &:= (y_{111},\ldots,y_{11N},\ldots,y_{1JN},\ldots,y_{IJN})^{\mathsf{T}}
   \in\mathbb{C}^{IJN} \\
   \mathcal{I}(\boldsymbol{W}_{i})
   &= - \log|\det\boldsymbol{W}_{i}|,

where :math:`\mathcal{P}` is a penalty funcion that is determined by the source model.

Let us consider independent vector analysis.
In this case, :math:`\mathcal{P}` can be written by

.. math::
   \mathcal{P}(\mathcal{V}(\mathcal{Y}))
   = C\sum_{j,n}\left(
   \sum_{i}\left|\boldsymbol{w}_{in}^{\mathsf{H}}\boldsymbol{x}_{ij}\right|^{2}
   \right)^{\frac{1}{2}},

where :math:`C` is a positive constant.

To the above formulation, we can apply the primal-dual splitting algorithm.
On the basis of this algorithm, the demixing filter is updated as follows:

.. math::
   \tilde{\boldsymbol{W}}_{i}
   &\leftarrow\mathrm{prox}_{\mu_{1}\mathcal{I}}
   \left[\boldsymbol{W}_{i} - \mu_{1}\mu_{2}\sum_{j}\boldsymbol{u}_{ij}\boldsymbol{x}_{ij}^{\mathsf{H}}\right] \\
   \boldsymbol{z}_{ij}
   &\leftarrow\boldsymbol{u}_{ij} + \left(2 * \tilde{\boldsymbol{W}}_{i} - \boldsymbol{W}_{i}\right)\boldsymbol{x}_{ij} \\
   \mathcal{V}(\tilde{\mathcal{U}})
   &\leftarrow\mathcal{V}(\mathcal{Z})
   - \mathrm{prox}_{\mathcal{P}/\mu_{2}}\left[\mathcal{V}(\mathcal{Z})\right] \\
   \boldsymbol{u}_{ij}
   &\leftarrow\alpha\tilde{\boldsymbol{u}}_{ij} + (1 - \alpha)\boldsymbol{u}_{ij}, \\
   \boldsymbol{W}_{i}
   &\leftarrow\alpha\tilde{\boldsymbol{W}}_{i} + (1 - \alpha)\boldsymbol{W}_{i}.

:math:`\boldsymbol{u}_{ij}` is a dual variable, which should be initialized by a certain value.
:math:`\mathrm{prox}_{g}` is a proximal operator defined as

.. math::
   \mathrm{prox}_{g}[\boldsymbol{z}]
   = \mathrm{argmin}_{\boldsymbol{y}}
   ~~g(\boldsymbol{y}) + \frac{1}{2}\|\boldsymbol{z} - \boldsymbol{y}\|_{2}^{2}.

For :math:`\mathcal{I}`, we can obatain the following proximal operator:

.. math::
   \mathrm{prox}_{\mu\mathcal{I}}[\boldsymbol{W}_{i}]
   &= \boldsymbol{U}_{i}\tilde{\boldsymbol{\Sigma}}_{i}\boldsymbol{V}_{i}^{\mathsf{H}}, \\
   \tilde{\boldsymbol{\Sigma}}_{i}
   &= \mathrm{diag}(\tilde{\sigma}_{i1},\ldots,\tilde{\sigma}_{iN}), \\
   \tilde{\sigma}_{in}
   &= \frac{\sigma_{in} + \sqrt{\sigma_{in}^{2} + 4\mu}}{2},

where :math:`\boldsymbol{U}_{i}`, :math:`\boldsymbol{V}_{i}`,
and :math:`\boldsymbol{\Sigma}_{i}=\mathrm{diag}(\sigma_{i1},\ldots,\sigma_{iN})` are singular value decomposition.

.. math::
   \boldsymbol{W}_{i}
   = \boldsymbol{U}_{i}\boldsymbol{\Sigma}_{i}\boldsymbol{V}_{i}^{\mathsf{H}}.

When :math:`\mathcal{P}` is defined as

.. math::
   \mathcal{P}(\mathcal{V}(\mathcal{Y}))
   = C\sum_{j,n}\left(
   \sum_{i}\left|\boldsymbol{w}_{in}^{\mathsf{H}}\boldsymbol{x}_{ij}\right|^{2}
   \right)^{\frac{1}{2}},

the updates by the proximal operator can be written as

.. math::
   y_{ijn}
   \leftarrow\left(1 - \frac{\mu}{\sqrt{\sum_{i}|y_{ijn}|^{2}}}\right)_{+}y_{ijn}.

Algorithms
~~~~~~~~~~
.. autoclass:: ssspy.bss.pdsbss.PDSBSSBase

.. autoclass:: ssspy.bss.pdsbss.PDSBSS
   :special-members: __call__
   :members: update_once


================================================
FILE: docs/ssspy.bss.proxbss.rst
================================================
ssspy.bss.proxbss
=================

Algorithms
~~~~~~~~~~
.. autoclass:: ssspy.bss.proxbss.ProxBSSBase
    :special-members: __call__
    :members: separate, compute_loss, compute_logdet, normalize_by_spectral_norm, restore_scale, apply_projection_back, apply_minimal_distortion_principle


================================================
FILE: docs/ssspy.bss.rst
================================================
ssspy.bss
=========

``ssspy.bss`` provides various blind source separation methods.

Submodules
~~~~~~~~~~

.. toctree::
   :maxdepth: 1

   ssspy.bss.base
   ssspy.bss.ica
   ssspy.bss.fdica
   ssspy.bss.iva
   ssspy.bss.ilrma
   ssspy.bss.mnmf
   ssspy.bss.proxbss
   ssspy.bss.pdsbss
   ssspy.bss.admmbss
   ssspy.bss.hva
   ssspy.bss.cacgmm


================================================
FILE: docs/ssspy.linalg.rst
================================================
ssspy.linalg
============

``ssspy.linalg`` is linear algebra module related to source separation.

Algorithms
~~~~~~~~~~
.. autofunction:: ssspy.linalg.inv2

.. autofunction:: ssspy.linalg.eigh

.. autofunction:: ssspy.linalg.eigh2

.. autofunction:: ssspy.linalg.gmeanmh

.. autofunction:: ssspy.linalg.lqpqm2


================================================
FILE: docs/ssspy.special.rst
================================================
ssspy.special
=============

``ssspy.special`` is a module related to special function.

Algorithms
~~~~~~~~~~
.. autofunction:: ssspy.special.logsumexp

.. autofunction:: ssspy.special.softmax


================================================
FILE: docs/ssspy.transform.rst
================================================
ssspy.transform
===============

``ssspy.transform`` provides transforms related to source separation.

Algorithms
~~~~~~~~~~
.. autofunction:: ssspy.transform.pca

.. autofunction:: ssspy.transform.whiten


================================================
FILE: notebooks/BSS/ADMMBSS/ADMMBSS.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"authorship_tag":"ABX9TyPQC07HvYHC5TQxnCCmzCwE"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"IuOxOjnRWK-4"},"outputs":[],"source":["!pip install git+https://github.com/tky823/ssspy.git"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import matplotlib.pyplot as plt\n","import IPython.display as ipd"],"metadata":{"id":"CdZN4hyHWOy8"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"LcS_A4hyWRqL"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 2\n","max_duration = 10\n","sisec2010_tag = \"dev1_female3\"\n","n_fft, hop_length = 4096, 2048"],"metadata":{"id":"O7PTMc5qWTWR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=True,\n",")  # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"K4qwWkHcWvzv"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"x3gWs4LgWxSD"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.transform import whiten\n","from ssspy.algorithm import projection_back\n","from ssspy.bss.admmbss import ADMMBSS\n","from ssspy.linalg import prox"],"metadata":{"id":"j7Gd1k-8Wy0L"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["def l21_fn(y: np.ndarray) -> np.ndarray:\n","    \"\"\"Mixed L21 norm.\n","\n","    Args:\n","        y (np.ndarray):\n","            Input vector with shape of (n_sources, n_bins, n_frames).\n","\n","    Returns:\n","        Sum of mixed L21 norm.\n","    \"\"\"\n","    G = np.linalg.norm(y, axis=1)\n","    loss = np.sum(G, axis=(0, 1))\n","\n","    return loss\n","\n","def prox_l21(y, step_size: float = 1) -> np.ndarray:\n","    \"\"\"Apply proximal operator of mixed L21 norm.\n","\n","    Args:\n","        y (np.ndarray):\n","            Input vector with shape of (n_sources, n_bins, n_frames).\n","        step_size (float):\n","            Step size parameter.\n","\n","    Returns:\n","        Output value computed by proximal operator of mixed L21 norm.\n","        The shape of (n_sources, n_bins, n_frames).\n","    \"\"\"\n","    norm = np.linalg.norm(y, axis=1, keepdims=True)\n","\n","    # to suppress warning RuntimeWarning\n","    norm = np.where(norm < step_size, step_size, norm)\n","\n","    return np.maximum(1 - step_size / norm, 0) * y"],"metadata":{"id":"w87aPEguW1jU"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["admm_bss = ADMMBSS(\n","    rho=0.5,\n","    relaxation=1.75,\n","    penalty_fn=l21_fn,\n","    prox_penalty=prox_l21,\n","    scale_restoration=False,\n",")\n","print(admm_bss)"],"metadata":{"id":"YrwbKut7W9AE"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"xoI6OCVvXAOm"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_mix_whitened = whiten(spectrogram_mix)\n","spectrogram_mix_normalized = admm_bss.normalize_by_spectral_norm(spectrogram_mix_whitened)\n","spectrogram_est = admm_bss(spectrogram_mix_normalized, n_iter=1000)\n","spectrogram_est = projection_back(spectrogram_est, reference=spectrogram_mix)"],"metadata":{"id":"L6B1UOU0XCJf"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"EoeJuHniXDiG"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"7c0RlLEFXGgM"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(admm_bss.loss[1:])\n","plt.show()\n","plt.close()"],"metadata":{"id":"XnPQAUxGXH2i"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"y9ydVrlzXaQH"},"execution_count":null,"outputs":[]}]}

================================================
FILE: notebooks/BSS/ADMMBSS/ADMMBSS_multi-penalty.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"authorship_tag":"ABX9TyOoGT5woLRACpymG/HuTm0y"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"2A1FpkQ-h3ks"},"outputs":[],"source":["!pip install git+https://github.com/tky823/ssspy.git"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import matplotlib.pyplot as plt\n","import IPython.display as ipd"],"metadata":{"id":"T-AFlnULiPGj"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"SLUkWHVGiQN4"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 2\n","max_duration = 10\n","sisec2010_tag = \"dev1_female3\"\n","n_fft, hop_length = 4096, 2048"],"metadata":{"id":"UHG42oI4iRPU"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=True,\n",")  # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"1jdtdFu9iSRX"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"vCzucZlBiTps"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["import functools"],"metadata":{"id":"wqekYV1aiU0n"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.transform import whiten\n","from ssspy.algorithm import projection_back\n","from ssspy.bss.admmbss import ADMMBSS"],"metadata":{"id":"-78PZk8WiV2z"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["def l21_fn(y: np.ndarray) -> np.ndarray:\n","    \"\"\"Compute sum of mixed L21 norm.\n","\n","    Args:\n","        y (np.ndarray):\n","            Input vector with shape of (n_sources, n_bins, n_frames).\n","\n","    Returns:\n","        Sum of mixed L21 norm.\n","    \"\"\"\n","    G = np.linalg.norm(y, axis=1)\n","    loss = np.sum(G, axis=(0, 1))\n","\n","    return loss\n","\n","def lamb_l1_fn(y: np.ndarray, lamb: float = 1) -> np.ndarray:\n","    \"\"\"Compute sum of L1 norm.\n","\n","    Args:\n","        y (np.ndarray):\n","            Input vector with shape of (n_sources, n_bins, n_frames).\n","\n","    Returns:\n","        Sum of L1 norm.\n","    \"\"\"\n","    G = np.abs(y)\n","    loss = lamb * np.sum(G, axis=(0, 1, 2))\n","\n","    return loss\n","\n","def prox_l21(y: np.ndarray, step_size: float = 1) -> np.ndarray:\n","    \"\"\"Apply proximal operator of mixed L21 norm.\n","\n","    Args:\n","        y (np.ndarray):\n","            Input vector with shape of (n_sources, n_bins, n_frames).\n","        step_size (float):\n","            Step size parameter.\n","\n","    Returns:\n","        Output value computed by proximal operator of mixed L21 norm.\n","        The shape of (n_sources, n_bins, n_frames).\n","    \"\"\"\n","    norm = np.linalg.norm(y, axis=1, keepdims=True)\n","\n","    # to suppress warning RuntimeWarning\n","    norm = np.where(norm < step_size, step_size, norm)\n","\n","    return np.maximum(1 - step_size / norm, 0) * y\n","\n","def prox_lamb_l1(y: np.ndarray, step_size: float=1, lamb: float = 1) -> np.ndarray:\n","    \"\"\"Apply proximal operator of L1 norm.\n","\n","    Args:\n","        y (np.ndarray):\n","            Input vector with shape of (n_sources, n_bins, n_frames).\n","        step_size (float):\n","            Step size parameter.\n","\n","    Returns:\n","        Output value computed by proximal operator of L1 norm.\n","        The shape of (n_sources, n_bins, n_frames).\n","    \"\"\"\n","    norm = np.abs(y)\n","\n","    # to suppress warning RuntimeWarning\n","    norm = np.where(norm < step_size * lamb, step_size * lamb, norm)\n","\n","    return np.maximum(1 - (step_size * lamb) / norm, 0) * y"],"metadata":{"id":"FrDLnrzOiYYM"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["# SparseIVA without masking\n","penalty_fn = [\n","    l21_fn,\n","    functools.partial(lamb_l1_fn, lamb=1e-4),\n","]\n","prox_penalty = [\n","    prox_l21,\n","    functools.partial(prox_lamb_l1, lamb=1e-4),\n","]"],"metadata":{"id":"wk0H7Lj9iaOQ"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["admm_bss = ADMMBSS(\n","    rho=0.5,\n","    relaxation=1.75,\n","    penalty_fn=penalty_fn,\n","    prox_penalty=prox_penalty,\n","    scale_restoration=False\n",")\n","print(admm_bss)"],"metadata":{"id":"lguDznJaihz_"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"T4aYnKTXirf4"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_mix_whitened = whiten(spectrogram_mix)\n","spectrogram_mix_normalized = admm_bss.normalize_by_spectral_norm(spectrogram_mix_whitened)\n","spectrogram_est = admm_bss(spectrogram_mix_normalized, n_iter=1000)\n","spectrogram_est = projection_back(spectrogram_est, reference=spectrogram_mix)"],"metadata":{"id":"w9DwgYhOitYv"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"TuUenwuBivge"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"8HjLaHqnixOp"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(admm_bss.loss[1:])\n","plt.show()\n","plt.close()"],"metadata":{"id":"ENGBhkjHiyTi"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"dssD7pzZkZ0H"},"execution_count":null,"outputs":[]}]}

================================================
FILE: notebooks/BSS/CACGMM/CACGMM.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"mPK5sQpmunbL"},"outputs":[],"source":["!pip install ssspy"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import matplotlib.pyplot as plt\n","import IPython.display as ipd\n","from tqdm.notebook import tqdm"],"metadata":{"id":"gF-CVqpZuq7y"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"LJto4YUHusBK"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 2\n","max_duration = 10\n","sisec2010_tag = \"dev1_female3\"\n","n_fft, hop_length = 4096, 2048"],"metadata":{"id":"RypuaK8GutWj"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=True,\n",")  # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"F8UVIE67uwNv"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"M6rHkLzcuzZL"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.bss.cacgmm import CACGMM as CACGMMBase"],"metadata":{"id":"mBxB5tm2u0X7"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["class CACGMM(CACGMMBase):\n","    def __init__(self, *args, **kwargs):\n","        super().__init__(*args, **kwargs)\n","\n","        self.progress_bar = None\n","\n","    def __call__(\n","        self, input: np.ndarray, n_iter: int = 100, initial_call: bool = True, **kwargs\n","    ) -> np.ndarray:\n","        self.n_iter = n_iter\n","\n","        return super().__call__(input, n_iter=n_iter, initial_call=initial_call, **kwargs)\n","\n","    def update_once(self) -> None:\n","        if self.progress_bar is None:\n","            self.progress_bar = tqdm(total=self.n_iter)\n","\n","        super().update_once()\n","\n","        self.progress_bar.update(1)"],"metadata":{"id":"12peq3Xyu2WM"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["cacgmm = CACGMM(\n","    permutation_alignment=\"posterior_score\",\n","    global_iter=100,\n","    local_iter=100,\n","    rng=np.random.default_rng(42)\n",")\n","print(cacgmm)"],"metadata":{"id":"P7QNo371u3YP"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"g-vqiYCUu6id"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_est = cacgmm(spectrogram_mix, n_iter=200)"],"metadata":{"id":"QQ3MmBwpu6f3"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"tMz1cFCKu9Nk"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"La9fImOkvAE5"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(cacgmm.loss[1:])\n","plt.show()\n","plt.close()"],"metadata":{"id":"ySSBSypivAAN"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"AyyuPUvlyTxN"},"execution_count":null,"outputs":[]}]}

================================================
FILE: notebooks/BSS/FDICA/AuxFDICA-IP1.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"tLYLOhzujeH1"},"outputs":[],"source":["!pip install ssspy"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import matplotlib.pyplot as plt\n","import IPython.display as ipd"],"metadata":{"id":"3WPpY4HOjmvT"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"AdivKHWiDs5L"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 2\n","max_duration = 10\n","sisec2010_tag = \"dev1_female3\"\n","n_fft, hop_length = 4096, 2048"],"metadata":{"id":"Xve1xr0Ijn-O"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=True,\n",")  # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"ist3AxTsjtLi"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"LFWwc0y9kJDq"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.transform import whiten\n","from ssspy.algorithm import projection_back\n","from ssspy.bss.fdica import AuxFDICA"],"metadata":{"id":"ArUmiPttkKYH"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["def contrast_fn(y):\n","    return 2 * np.abs(y)\n","\n","def d_contrast_fn(y):\n","    return 2 * np.ones_like(y)"],"metadata":{"id":"6lTfgEW9kNN0"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["fdica = AuxFDICA(\n","    spatial_algorithm=\"IP1\",  # You can set \"IP\" instead of \"IP1\".\n","    contrast_fn=contrast_fn,\n","    d_contrast_fn=d_contrast_fn,\n","    scale_restoration=False\n",")\n","print(fdica)"],"metadata":{"id":"y0T8jywSkRyb"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"jHa8QSFtkaEM"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_mix_whitened = whiten(spectrogram_mix)\n","spectrogram_est = fdica(spectrogram_mix_whitened, n_iter=20)\n","spectrogram_est = projection_back(spectrogram_est, reference=spectrogram_mix)"],"metadata":{"id":"tHNkZgPakcAc"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"ZHugIyaRkdID"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"NYCtIWSbke2a"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(fdica.loss)\n","plt.show()\n","plt.close()"],"metadata":{"id":"O7vW3o-ykhCN"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"DSAFgg91kjsb"},"execution_count":null,"outputs":[]}]}

================================================
FILE: notebooks/BSS/FDICA/AuxFDICA-IP2.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"iLMRz5h_I_U_"},"outputs":[],"source":["!pip install ssspy"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import matplotlib.pyplot as plt\n","import IPython.display as ipd"],"metadata":{"id":"k4vmcNb5em_x"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"LbrobIqgDyVY"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 2\n","max_duration = 10\n","sisec2010_tag = \"dev1_female3\"\n","n_fft, hop_length = 4096, 2048"],"metadata":{"id":"faUwi6X9esWR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=True,\n",")  # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"7jwyi2wReuRR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"Pa28gsTce8yt"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.transform import whiten\n","from ssspy.algorithm import projection_back\n","from ssspy.bss.fdica import AuxFDICA"],"metadata":{"id":"tixTvLybe-w7"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["def contrast_fn(y):\n","    return 2 * np.abs(y)\n","\n","def d_contrast_fn(y):\n","    return 2 * np.ones_like(y)"],"metadata":{"id":"6AvhtkrdfAeZ"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["fdica = AuxFDICA(\n","    spatial_algorithm=\"IP2\",\n","    contrast_fn=contrast_fn,\n","    d_contrast_fn=d_contrast_fn,\n","    scale_restoration=False\n",")\n","print(fdica)"],"metadata":{"id":"h5GghnnMfP1F"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"EecGuY-JfSBB"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_mix_whitened = whiten(spectrogram_mix)\n","spectrogram_est = fdica(spectrogram_mix_whitened, n_iter=50)\n","spectrogram_est = projection_back(spectrogram_est, reference=spectrogram_mix)"],"metadata":{"id":"O3D2eA8HfVs2"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"jdCqrAdPfXkk"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"xXTnlid-fZb3"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(fdica.loss)\n","plt.show()\n","plt.close()"],"metadata":{"id":"OHjwNcZIfe0K"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"qsBes0ysf9Sd"},"execution_count":null,"outputs":[]}]}

================================================
FILE: notebooks/BSS/FDICA/AuxLaplaceFDICA-IP1.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"tLYLOhzujeH1"},"outputs":[],"source":["!pip install ssspy"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import matplotlib.pyplot as plt\n","import IPython.display as ipd"],"metadata":{"id":"3WPpY4HOjmvT"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"AdivKHWiDs5L"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 2\n","max_duration = 10\n","sisec2010_tag = \"dev1_female3\"\n","n_fft, hop_length = 4096, 2048"],"metadata":{"id":"Xve1xr0Ijn-O"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=True,\n",")  # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"ist3AxTsjtLi"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"LFWwc0y9kJDq"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.transform import whiten\n","from ssspy.algorithm import projection_back\n","from ssspy.bss.fdica import AuxLaplaceFDICA"],"metadata":{"id":"ArUmiPttkKYH"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["fdica = AuxLaplaceFDICA(\n","    spatial_algorithm=\"IP1\",  # You can set \"IP\" instead of \"IP1\".\n","    scale_restoration=False\n",")\n","print(fdica)"],"metadata":{"id":"y0T8jywSkRyb"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"jHa8QSFtkaEM"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_mix_whitened = whiten(spectrogram_mix)\n","spectrogram_est = fdica(spectrogram_mix_whitened, n_iter=20)\n","spectrogram_est = projection_back(spectrogram_est, reference=spectrogram_mix)"],"metadata":{"id":"tHNkZgPakcAc"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"ZHugIyaRkdID"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"NYCtIWSbke2a"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(fdica.loss)\n","plt.show()\n","plt.close()"],"metadata":{"id":"O7vW3o-ykhCN"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"DSAFgg91kjsb"},"execution_count":null,"outputs":[]}]}

================================================
FILE: notebooks/BSS/FDICA/AuxLaplaceFDICA-IP2.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"iLMRz5h_I_U_"},"outputs":[],"source":["!pip install ssspy"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import matplotlib.pyplot as plt\n","import IPython.display as ipd"],"metadata":{"id":"k4vmcNb5em_x"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"LbrobIqgDyVY"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 2\n","max_duration = 10\n","sisec2010_tag = \"dev1_female3\"\n","n_fft, hop_length = 4096, 2048"],"metadata":{"id":"faUwi6X9esWR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=True,\n",")  # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"7jwyi2wReuRR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"Pa28gsTce8yt"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.transform import whiten\n","from ssspy.algorithm import projection_back\n","from ssspy.bss.fdica import AuxLaplaceFDICA"],"metadata":{"id":"tixTvLybe-w7"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["fdica = AuxLaplaceFDICA(\n","    spatial_algorithm=\"IP2\",\n","    scale_restoration=False\n",")\n","print(fdica)"],"metadata":{"id":"h5GghnnMfP1F"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"EecGuY-JfSBB"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_mix_whitened = whiten(spectrogram_mix)\n","spectrogram_est = fdica(spectrogram_mix_whitened, n_iter=50)\n","spectrogram_est = projection_back(spectrogram_est, reference=spectrogram_mix)"],"metadata":{"id":"O3D2eA8HfVs2"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"jdCqrAdPfXkk"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"xXTnlid-fZb3"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(fdica.loss)\n","plt.show()\n","plt.close()"],"metadata":{"id":"OHjwNcZIfe0K"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"qsBes0ysf9Sd"},"execution_count":null,"outputs":[]}]}

================================================
FILE: notebooks/BSS/FDICA/GradFDICA.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"iLMRz5h_I_U_"},"outputs":[],"source":["!pip install ssspy"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import matplotlib.pyplot as plt\n","import IPython.display as ipd"],"metadata":{"id":"k4vmcNb5em_x"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"9mP-wlwN_imY"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 2\n","max_duration = 10\n","sisec2010_tag = \"dev1_female3\"\n","n_fft, hop_length = 4096, 2048"],"metadata":{"id":"faUwi6X9esWR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=True,\n",")  # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"LvF_rAusCHdf"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"Pa28gsTce8yt"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.transform import whiten\n","from ssspy.algorithm import projection_back\n","from ssspy.bss.fdica import GradFDICA"],"metadata":{"id":"tixTvLybe-w7"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["def contrast_fn(y):\n","    return 2 * np.abs(y)\n","\n","def score_fn(y):\n","    denom = np.maximum(np.abs(y), 1e-10)\n","    return y / denom"],"metadata":{"id":"6AvhtkrdfAeZ"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## Holonomic type"],"metadata":{"id":"Gaz1FrqQfSY_"}},{"cell_type":"code","source":["fdica = GradFDICA(\n","    step_size=1e-1,\n","    contrast_fn=contrast_fn,\n","    score_fn=score_fn,\n","    is_holonomic=True,\n","    scale_restoration=False\n",")\n","print(fdica)"],"metadata":{"id":"h5GghnnMfP1F"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"EecGuY-JfSBB"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_mix_whitened = whiten(spectrogram_mix)\n","spectrogram_est = fdica(spectrogram_mix_whitened, n_iter=500)\n","spectrogram_est = projection_back(spectrogram_est, reference=spectrogram_mix)"],"metadata":{"id":"O3D2eA8HfVs2"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"jdCqrAdPfXkk"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"xXTnlid-fZb3"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(fdica.loss)\n","plt.show()\n","plt.close()"],"metadata":{"id":"OHjwNcZIfe0K"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## Non-holonomic type"],"metadata":{"id":"vBVuX7V_frpo"}},{"cell_type":"code","source":["fdica = GradFDICA(\n","    step_size=1e-1,\n","    contrast_fn=contrast_fn,\n","    score_fn=score_fn,\n","    is_holonomic=False,\n","    scale_restoration=False\n",")\n","print(fdica)"],"metadata":{"id":"ONLA5XqSfooH"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"PkLxGIrcfw5W"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_mix_whitened = whiten(spectrogram_mix)\n","spectrogram_est = fdica(spectrogram_mix_whitened, n_iter=500)\n","spectrogram_est = projection_back(spectrogram_est, reference=spectrogram_mix)"],"metadata":{"id":"1ZK8uv99fzU-"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"5TmNEew4f00R"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"qEmFDyaLf23E"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(fdica.loss)\n","plt.show()\n","plt.close()"],"metadata":{"id":"Jvh7YJVdf7QR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"qsBes0ysf9Sd"},"execution_count":null,"outputs":[]}]}

================================================
FILE: notebooks/BSS/FDICA/GradLaplaceFDICA.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"iLMRz5h_I_U_"},"outputs":[],"source":["!pip install ssspy"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import matplotlib.pyplot as plt\n","import IPython.display as ipd"],"metadata":{"id":"k4vmcNb5em_x"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"9mP-wlwN_imY"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 2\n","max_duration = 10\n","sisec2010_tag = \"dev1_female3\"\n","n_fft, hop_length = 4096, 2048"],"metadata":{"id":"faUwi6X9esWR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=True,\n",")  # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"LvF_rAusCHdf"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"Pa28gsTce8yt"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.transform import whiten\n","from ssspy.algorithm import projection_back\n","from ssspy.bss.fdica import GradLaplaceFDICA"],"metadata":{"id":"tixTvLybe-w7"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## Holonomic type"],"metadata":{"id":"Gaz1FrqQfSY_"}},{"cell_type":"code","source":["fdica = GradLaplaceFDICA(\n","    step_size=1e-1,\n","    is_holonomic=True,\n","    scale_restoration=False\n",")\n","print(fdica)"],"metadata":{"id":"h5GghnnMfP1F"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"EecGuY-JfSBB"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_mix_whitened = whiten(spectrogram_mix)\n","spectrogram_est = fdica(spectrogram_mix_whitened, n_iter=500)\n","spectrogram_est = projection_back(spectrogram_est, reference=spectrogram_mix)"],"metadata":{"id":"O3D2eA8HfVs2"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"jdCqrAdPfXkk"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"xXTnlid-fZb3"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(fdica.loss)\n","plt.show()\n","plt.close()"],"metadata":{"id":"OHjwNcZIfe0K"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## Non-holonomic type"],"metadata":{"id":"vBVuX7V_frpo"}},{"cell_type":"code","source":["fdica = GradLaplaceFDICA(\n","    step_size=1e-1,\n","    is_holonomic=False,\n","    scale_restoration=False\n",")\n","print(fdica)"],"metadata":{"id":"ONLA5XqSfooH"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"PkLxGIrcfw5W"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_mix_whitened = whiten(spectrogram_mix)\n","spectrogram_est = fdica(spectrogram_mix_whitened, n_iter=500)\n","spectrogram_est = projection_back(spectrogram_est, reference=spectrogram_mix)"],"metadata":{"id":"1ZK8uv99fzU-"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"5TmNEew4f00R"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"qEmFDyaLf23E"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(fdica.loss)\n","plt.show()\n","plt.close()"],"metadata":{"id":"Jvh7YJVdf7QR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"qsBes0ysf9Sd"},"execution_count":null,"outputs":[]}]}

================================================
FILE: notebooks/BSS/FDICA/NaturalGradFDICA.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"2z5vwPlhedKU"},"outputs":[],"source":["!pip install ssspy"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import matplotlib.pyplot as plt\n","import IPython.display as ipd"],"metadata":{"id":"8We0lvX8gHYO"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"otDru1KgDYlM"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 2\n","max_duration = 10\n","sisec2010_tag = \"dev1_female3\"\n","n_fft, hop_length = 4096, 2048"],"metadata":{"id":"hdwn-vr6gK7N"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=True,\n",")  # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"dsjZqOE3gMJt"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"z4VECyzxgNzM"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.transform import whiten\n","from ssspy.algorithm import projection_back\n","from ssspy.bss.fdica import NaturalGradFDICA"],"metadata":{"id":"sjX2hNDEgPVk"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["def contrast_fn(y):\n","    return 2 * np.abs(y)\n","\n","def score_fn(y):\n","    denom = np.maximum(np.abs(y), 1e-10)\n","    return y / denom"],"metadata":{"id":"ATe35A28gRQp"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## Holonomic type"],"metadata":{"id":"r7fJ65ougw56"}},{"cell_type":"code","source":["fdica = NaturalGradFDICA(\n","    step_size=1e-1,\n","    contrast_fn=contrast_fn,\n","    score_fn=score_fn,\n","    is_holonomic=True,\n",")\n","print(fdica)"],"metadata":{"id":"wL3nVUeagSsv"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"CpKeyzimghGg"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_est = fdica(spectrogram_mix, n_iter=500)"],"metadata":{"id":"uk0geR7pgkY5"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"Y5SHhlEQgmac"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"XxQYDDkegolW"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(fdica.loss)\n","plt.show()\n","plt.close()"],"metadata":{"id":"EEI1EfyVgsrF"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## Non-holonomic type"],"metadata":{"id":"JkE7CwScg6He"}},{"cell_type":"code","source":["fdica = NaturalGradFDICA(\n","    step_size=1e-1,\n","    contrast_fn=contrast_fn,\n","    score_fn=score_fn,\n","    is_holonomic=False,\n","    scale_restoration=False\n",")\n","print(fdica)"],"metadata":{"id":"qjAwSFQJg2mc"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"QS_zwah4g8Cf"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_mix_whitened = whiten(spectrogram_mix)\n","spectrogram_est = fdica(spectrogram_mix_whitened, n_iter=500)\n","spectrogram_est = projection_back(spectrogram_est, reference=spectrogram_mix)"],"metadata":{"id":"cPMDNHZtg-Cu"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"jsgG54MGhBAi"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"9c4OLGoWhCkg"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(fdica.loss)\n","plt.show()\n","plt.close()"],"metadata":{"id":"_5PVRsCdhEFr"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"Z7YaF_48hGcB"},"execution_count":null,"outputs":[]}]}

================================================
FILE: notebooks/BSS/FDICA/NaturalGradLaplaceFDICA.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"2z5vwPlhedKU"},"outputs":[],"source":["!pip install ssspy"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import matplotlib.pyplot as plt\n","import IPython.display as ipd"],"metadata":{"id":"8We0lvX8gHYO"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"otDru1KgDYlM"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 2\n","max_duration = 10\n","sisec2010_tag = \"dev1_female3\"\n","n_fft, hop_length = 4096, 2048"],"metadata":{"id":"hdwn-vr6gK7N"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=True,\n",")  # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"dsjZqOE3gMJt"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"z4VECyzxgNzM"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.transform import whiten\n","from ssspy.algorithm import projection_back\n","from ssspy.bss.fdica import NaturalGradLaplaceFDICA"],"metadata":{"id":"sjX2hNDEgPVk"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## Holonomic type"],"metadata":{"id":"r7fJ65ougw56"}},{"cell_type":"code","source":["fdica = NaturalGradLaplaceFDICA(\n","    step_size=1e-1,\n","    is_holonomic=True,\n",")\n","print(fdica)"],"metadata":{"id":"wL3nVUeagSsv"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"CpKeyzimghGg"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_est = fdica(spectrogram_mix, n_iter=500)"],"metadata":{"id":"uk0geR7pgkY5"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"Y5SHhlEQgmac"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"XxQYDDkegolW"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(fdica.loss)\n","plt.show()\n","plt.close()"],"metadata":{"id":"EEI1EfyVgsrF"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## Non-holonomic type"],"metadata":{"id":"JkE7CwScg6He"}},{"cell_type":"code","source":["fdica = NaturalGradLaplaceFDICA(\n","    step_size=1e-1,\n","    is_holonomic=False,\n","    scale_restoration=False\n",")\n","print(fdica)"],"metadata":{"id":"qjAwSFQJg2mc"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"QS_zwah4g8Cf"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_mix_whitened = whiten(spectrogram_mix)\n","spectrogram_est = fdica(spectrogram_mix_whitened, n_iter=500)\n","spectrogram_est = projection_back(spectrogram_est, reference=spectrogram_mix)"],"metadata":{"id":"cPMDNHZtg-Cu"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"jsgG54MGhBAi"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"9c4OLGoWhCkg"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(fdica.loss)\n","plt.show()\n","plt.close()"],"metadata":{"id":"_5PVRsCdhEFr"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"Z7YaF_48hGcB"},"execution_count":null,"outputs":[]}]}

================================================
FILE: notebooks/BSS/HVA/ADMM-HVA.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"authorship_tag":"ABX9TyOmTvOlLp1H2ygKo0T05BU4"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"eADaj8ajw-Hk"},"outputs":[],"source":["!pip install git+https://github.com/tky823/ssspy.git"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import IPython.display as ipd"],"metadata":{"id":"-vUkn20rxHOV"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"niAQu6AxxRmF"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 2\n","max_duration = 10\n","sisec2010_tag = \"dev1_female3\"\n","n_fft, hop_length = 4096, 2048"],"metadata":{"id":"Rf3G-ViRxaRx"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=True,\n",")  # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"ivZ5VHBixbnN"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"SzYu9qPTxgfc"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.transform import whiten\n","from ssspy.algorithm import projection_back\n","from ssspy.bss.hva import MaskingADMMHVA"],"metadata":{"id":"niQwCmEkxhtQ"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["hva = MaskingADMMHVA(\n","    rho=0.5,\n","    relaxation=1.75,\n","    attenuation=0.2,\n","    scale_restoration=False,\n",")\n","print(hva)"],"metadata":{"id":"HIZcUll6xvXY"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"Q8bfISfwxwfd"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_mix_whitened = whiten(spectrogram_mix)\n","spectrogram_mix_normalized = hva.normalize_by_spectral_norm(spectrogram_mix_whitened)\n","spectrogram_est = hva(spectrogram_mix_normalized, n_iter=500)\n","spectrogram_est = projection_back(spectrogram_est, reference=spectrogram_mix)"],"metadata":{"id":"B7jVoSBCxyPu"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"etxpTfiTx1nz"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"I2ZhRdS1x3b6"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"EC6aKaZpx5Zd"},"execution_count":null,"outputs":[]}]}

================================================
FILE: notebooks/BSS/HVA/HVA.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"authorship_tag":"ABX9TyMJFxbBzvXESFspRTOKnHrj"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"N9ubIAwVRTVT"},"outputs":[],"source":["!pip install git+https://github.com/tky823/ssspy.git"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import IPython.display as ipd"],"metadata":{"id":"O9gHwzJNRmbD"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"qdeqalLKRoQS"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 2\n","max_duration = 10\n","sisec2010_tag = \"dev1_female3\"\n","n_fft, hop_length = 4096, 2048"],"metadata":{"id":"zODACQ83RpUy"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=True,\n",")  # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"o-csyI_2RqeI"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"-ORaaTs-RrgL"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.transform import whiten\n","from ssspy.algorithm import projection_back\n","from ssspy.bss.hva import HVA"],"metadata":{"id":"wtsPoH2CR2fl"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["hva = HVA(\n","    mu1=1,\n","    mu2=1,\n","    relaxation=1.75,\n","    attenuation=0.2,\n","    scale_restoration=False,\n",")\n","print(hva)"],"metadata":{"id":"JJphe0rSR6PG"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"u-SuTb4NR974"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_mix_whitened = whiten(spectrogram_mix)\n","spectrogram_mix_normalized = hva.normalize_by_spectral_norm(spectrogram_mix_whitened)\n","spectrogram_est = hva(spectrogram_mix_normalized, n_iter=200)\n","spectrogram_est = projection_back(spectrogram_est, reference=spectrogram_mix)"],"metadata":{"id":"BJY7JxF9R_F_"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"kxZrXVL7SBb7"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"vs8RFvEuSCqI"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"7CwmQlMpSDwn"},"execution_count":null,"outputs":[]}]}

================================================
FILE: notebooks/BSS/ICA/FastICA.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"iLMRz5h_I_U_"},"outputs":[],"source":["!pip install ssspy"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import matplotlib.pyplot as plt\n","import IPython.display as ipd"],"metadata":{"id":"k4vmcNb5em_x"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"rOvxrG-sfp02"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 2\n","max_duration = 10\n","sisec2010_tag = \"dev1_female3\""],"metadata":{"id":"faUwi6X9esWR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=False,\n",") # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"7jwyi2wReuRR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"Pa28gsTce8yt"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.bss.ica import FastICA"],"metadata":{"id":"tixTvLybe-w7"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["def contrast_fn(x):\n","    return np.log(1 + np.exp(x))\n","\n","def score_fn(x):\n","    return 1 / (1 + np.exp(-x))\n","\n","def d_score_fn(x):\n","    sigma = 1 / (1 + np.exp(-x))\n","    return sigma * (1 - sigma)"],"metadata":{"id":"6AvhtkrdfAeZ"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["ica = FastICA(\n","    contrast_fn=contrast_fn,\n","    score_fn=score_fn,\n","    d_score_fn=d_score_fn,\n",")\n","print(ica)"],"metadata":{"id":"h5GghnnMfP1F"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_est = ica(waveform_mix, n_iter=10)"],"metadata":{"id":"O3D2eA8HfVs2"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"xXTnlid-fZb3"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(ica.loss)\n","plt.show()\n","plt.close()"],"metadata":{"id":"OHjwNcZIfe0K"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"PAIdooVaylih"},"execution_count":null,"outputs":[]}]}

================================================
FILE: notebooks/BSS/ICA/GradICA.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"iLMRz5h_I_U_"},"outputs":[],"source":["!pip install ssspy"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import matplotlib.pyplot as plt\n","import IPython.display as ipd"],"metadata":{"id":"k4vmcNb5em_x"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"rOvxrG-sfp02"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 2\n","max_duration = 10\n","sisec2010_tag = \"dev1_female3\""],"metadata":{"id":"faUwi6X9esWR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=False,\n",") # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"7jwyi2wReuRR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"Pa28gsTce8yt"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.transform import whiten\n","from ssspy.bss.ica import GradICA"],"metadata":{"id":"tixTvLybe-w7"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["def contrast_fn(x):\n","    return np.log(1 + np.exp(x))\n","\n","def score_fn(x):\n","    return 1 / (1 + np.exp(-x))"],"metadata":{"id":"6AvhtkrdfAeZ"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## Holonomic type"],"metadata":{"id":"XifuX1ebyENl"}},{"cell_type":"code","source":["ica = GradICA(\n","    contrast_fn=contrast_fn, score_fn=score_fn, is_holonomic=True\n",")\n","print(ica)"],"metadata":{"id":"h5GghnnMfP1F"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_mix_whitened = whiten(waveform_mix)\n","waveform_est = ica(waveform_mix_whitened, n_iter=500)"],"metadata":{"id":"O3D2eA8HfVs2"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"xXTnlid-fZb3"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(ica.loss)\n","plt.show()\n","plt.close()"],"metadata":{"id":"OHjwNcZIfe0K"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## Non-holonomic type"],"metadata":{"id":"L3-HTRTWyhAl"}},{"cell_type":"code","source":["ica = GradICA(\n","    step_size=1e+0,\n","    contrast_fn=contrast_fn,\n","    score_fn=score_fn,\n","    is_holonomic=False\n",")\n","print(ica)"],"metadata":{"id":"qsBes0ysf9Sd"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_mix_whitened = whiten(waveform_mix)\n","waveform_est = ica(waveform_mix_whitened, n_iter=100)"],"metadata":{"id":"Dfp7ncInygoA"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"Ch8wdSFGyjrl"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(ica.loss)\n","plt.show()\n","plt.close()"],"metadata":{"id":"EeTia-LOykrm"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"PAIdooVaylih"},"execution_count":null,"outputs":[]}]}

================================================
FILE: notebooks/BSS/ICA/NaturalGradICA.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"iLMRz5h_I_U_"},"outputs":[],"source":["!pip install ssspy"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import matplotlib.pyplot as plt\n","import IPython.display as ipd"],"metadata":{"id":"k4vmcNb5em_x"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"rOvxrG-sfp02"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 2\n","max_duration = 10\n","sisec2010_tag = \"dev1_female3\""],"metadata":{"id":"faUwi6X9esWR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=False,\n",") # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"7jwyi2wReuRR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"Pa28gsTce8yt"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.transform import whiten\n","from ssspy.bss.ica import NaturalGradICA"],"metadata":{"id":"tixTvLybe-w7"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["def contrast_fn(x):\n","    return np.log(1 + np.exp(x))\n","\n","def score_fn(x):\n","    return 1 / (1 + np.exp(-x))"],"metadata":{"id":"6AvhtkrdfAeZ"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## Holonomic type"],"metadata":{"id":"XifuX1ebyENl"}},{"cell_type":"code","source":["ica = NaturalGradICA(\n","    contrast_fn=contrast_fn, score_fn=score_fn, is_holonomic=True\n",")\n","print(ica)"],"metadata":{"id":"h5GghnnMfP1F"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_est = ica(waveform_mix, n_iter=500)"],"metadata":{"id":"O3D2eA8HfVs2"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"xXTnlid-fZb3"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(ica.loss)\n","plt.show()\n","plt.close()"],"metadata":{"id":"OHjwNcZIfe0K"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## Non-holonomic type"],"metadata":{"id":"L3-HTRTWyhAl"}},{"cell_type":"code","source":["ica = NaturalGradICA(\n","    step_size=1e+0,\n","    contrast_fn=contrast_fn,\n","    score_fn=score_fn,\n","    is_holonomic=False\n",")\n","print(ica)"],"metadata":{"id":"qsBes0ysf9Sd"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_mix_whitened = whiten(waveform_mix)\n","waveform_est = ica(waveform_mix_whitened, n_iter=100)"],"metadata":{"id":"Dfp7ncInygoA"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"Ch8wdSFGyjrl"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(ica.loss)\n","plt.show()\n","plt.close()"],"metadata":{"id":"EeTia-LOykrm"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"PAIdooVaylih"},"execution_count":null,"outputs":[]}]}

================================================
FILE: notebooks/BSS/ILRMA/GGDILRMA-IP1-MM.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"iLMRz5h_I_U_"},"outputs":[],"source":["!pip install ssspy"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import matplotlib.pyplot as plt\n","import IPython.display as ipd\n","from tqdm.notebook import tqdm"],"metadata":{"id":"k4vmcNb5em_x"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"rOvxrG-sfp02"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 4\n","max_duration = 10\n","sisec2010_tag = \"dev1_female4\"\n","n_fft, hop_length = 4096, 2048"],"metadata":{"id":"faUwi6X9esWR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=True,\n",")  # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"7jwyi2wReuRR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"Pa28gsTce8yt"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.bss.ilrma import GGDILRMA as GGDILRMABase"],"metadata":{"id":"tixTvLybe-w7"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["class GGDILRMA(GGDILRMABase):\n","    def __init__(self, *args, **kwargs):\n","        super().__init__(*args, **kwargs)\n","\n","        self.progress_bar = None\n","\n","    def __call__(self, *args, n_iter: int = 100, **kwargs):\n","        self.n_iter = n_iter\n","\n","        return super().__call__(*args, n_iter=n_iter, **kwargs)\n","\n","    def update_once(self) -> None:\n","        if self.progress_bar is None:\n","            self.progress_bar = tqdm(total=self.n_iter)\n","\n","        super().update_once()\n","\n","        self.progress_bar.update(1)"],"metadata":{"id":"kyZFMq8BQJ-H"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## w/ partitioning function\n","For small $\\beta$, the combination of `normalization` and `flooring_fn` sometimes prevents numerical stability, so we set `normalization=False` in this notebook."],"metadata":{"id":"8ErS0NZ12Gyq"}},{"cell_type":"code","source":["ilrma = GGDILRMA(\n","    n_basis=8,\n","    beta=1.95,\n","    spatial_algorithm=\"IP1\",  # You can set \"IP\" instead of \"IP1\".\n","    domain=2,\n","    partitioning=True,  # w/ partitioning function\n","    normalization=False,\n","    rng=np.random.default_rng(42),\n",")\n","print(ilrma)"],"metadata":{"id":"h5GghnnMfP1F"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"EecGuY-JfSBB"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_est = ilrma(spectrogram_mix, n_iter=200)"],"metadata":{"id":"O3D2eA8HfVs2"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"jdCqrAdPfXkk"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"xXTnlid-fZb3"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(ilrma.loss[1:])\n","plt.show()\n","plt.close()"],"metadata":{"id":"OHjwNcZIfe0K"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## w/o partitioning function"],"metadata":{"id":"3iVGgX3F2M8Z"}},{"cell_type":"code","source":["ilrma = GGDILRMA(\n","    n_basis=2,\n","    beta=1.8,\n","    spatial_algorithm=\"IP1\",  # You can set \"IP\" instead of \"IP1\".\n","    domain=2,\n","    partitioning=False,  # w/o partitioning function\n","    rng=np.random.default_rng(42),\n",")\n","print(ilrma)"],"metadata":{"id":"qsBes0ysf9Sd"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"X6OsBzSZ2Q8Z"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_est = ilrma(spectrogram_mix, n_iter=200)"],"metadata":{"id":"Ccmek_Ek2Q6D"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"7VASi3lZ2Q39"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"ct-qKgs42ZK9"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(ilrma.loss[1:])\n","plt.show()\n","plt.close()"],"metadata":{"id":"SIpKCQTo2ZHl"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"r6q7VzoOzt-T"},"execution_count":null,"outputs":[]}]}

================================================
FILE: notebooks/BSS/ILRMA/GGDILRMA-IP2-MM.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"iLMRz5h_I_U_"},"outputs":[],"source":["!pip install ssspy"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import matplotlib.pyplot as plt\n","import IPython.display as ipd\n","from tqdm.notebook import tqdm"],"metadata":{"id":"k4vmcNb5em_x"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"rOvxrG-sfp02"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 4\n","max_duration = 10\n","sisec2010_tag = \"dev1_female4\"\n","n_fft, hop_length = 4096, 2048"],"metadata":{"id":"faUwi6X9esWR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=True,\n",")  # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"7jwyi2wReuRR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"Pa28gsTce8yt"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.bss.ilrma import GGDILRMA as GGDILRMABase"],"metadata":{"id":"tixTvLybe-w7"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["class GGDILRMA(GGDILRMABase):\n","    def __init__(self, *args, **kwargs):\n","        super().__init__(*args, **kwargs)\n","\n","        self.progress_bar = None\n","\n","    def __call__(self, *args, n_iter: int = 100, **kwargs):\n","        self.n_iter = n_iter\n","\n","        return super().__call__(*args, n_iter=n_iter, **kwargs)\n","\n","    def update_once(self) -> None:\n","        if self.progress_bar is None:\n","            self.progress_bar = tqdm(total=self.n_iter)\n","\n","        super().update_once()\n","\n","        self.progress_bar.update(1)"],"metadata":{"id":"hxhAhSwcQNuw"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## w/ partitioning function"],"metadata":{"id":"8ErS0NZ12Gyq"}},{"cell_type":"code","source":["ilrma = GGDILRMA(\n","    n_basis=8,\n","    beta=1.95,\n","    spatial_algorithm=\"IP2\",\n","    domain=2,\n","    partitioning=True,  # w/ partitioning function\n","    normalization=False,\n","    rng=np.random.default_rng(42),\n",")\n","print(ilrma)"],"metadata":{"id":"h5GghnnMfP1F"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"EecGuY-JfSBB"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_est = ilrma(spectrogram_mix, n_iter=200)"],"metadata":{"id":"O3D2eA8HfVs2"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"jdCqrAdPfXkk"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"xXTnlid-fZb3"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(ilrma.loss[1:])\n","plt.show()\n","plt.close()"],"metadata":{"id":"OHjwNcZIfe0K"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## w/o partitioning function"],"metadata":{"id":"3iVGgX3F2M8Z"}},{"cell_type":"code","source":["ilrma = GGDILRMA(\n","    n_basis=2,\n","    beta=1.9,\n","    spatial_algorithm=\"IP2\",\n","    domain=2,\n","    partitioning=False,  # w/o partitioning function\n","    rng=np.random.default_rng(42),\n",")\n","print(ilrma)"],"metadata":{"id":"qsBes0ysf9Sd"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"X6OsBzSZ2Q8Z"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_est = ilrma(spectrogram_mix, n_iter=200)"],"metadata":{"id":"Ccmek_Ek2Q6D"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"7VASi3lZ2Q39"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"ct-qKgs42ZK9"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(ilrma.loss[1:])\n","plt.show()\n","plt.close()"],"metadata":{"id":"SIpKCQTo2ZHl"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"r6q7VzoOzt-T"},"execution_count":null,"outputs":[]}]}

================================================
FILE: notebooks/BSS/ILRMA/GGDILRMA-ISS1-MM.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"iLMRz5h_I_U_"},"outputs":[],"source":["!pip install ssspy"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import matplotlib.pyplot as plt\n","import IPython.display as ipd\n","from tqdm.notebook import tqdm"],"metadata":{"id":"k4vmcNb5em_x"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"rOvxrG-sfp02"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 4\n","max_duration = 10\n","sisec2010_tag = \"dev1_female4\"\n","n_fft, hop_length = 4096, 2048"],"metadata":{"id":"faUwi6X9esWR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=True,\n",")  # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"7jwyi2wReuRR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"Pa28gsTce8yt"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.bss.ilrma import GGDILRMA as GGDILRMABase"],"metadata":{"id":"tixTvLybe-w7"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["class GGDILRMA(GGDILRMABase):\n","    def __init__(self, *args, **kwargs):\n","        super().__init__(*args, **kwargs)\n","\n","        self.progress_bar = None\n","\n","    def __call__(self, *args, n_iter: int = 100, **kwargs):\n","        self.n_iter = n_iter\n","\n","        return super().__call__(*args, n_iter=n_iter, **kwargs)\n","\n","    def update_once(self) -> None:\n","        if self.progress_bar is None:\n","            self.progress_bar = tqdm(total=self.n_iter)\n","\n","        super().update_once()\n","\n","        self.progress_bar.update(1)"],"metadata":{"id":"Y602oZNqQPBS"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## w/ partitioning function"],"metadata":{"id":"8ErS0NZ12Gyq"}},{"cell_type":"code","source":["ilrma = GGDILRMA(\n","    n_basis=8,\n","    beta=1.95,\n","    spatial_algorithm=\"ISS1\",  # You can set \"ISS\" instead of \"ISS1\".\n","    domain=2,\n","    partitioning=True,  # w/ partitioning function\n","    normalization=False,\n","    rng=np.random.default_rng(42),\n",")\n","print(ilrma)"],"metadata":{"id":"h5GghnnMfP1F"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"EecGuY-JfSBB"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_est = ilrma(spectrogram_mix, n_iter=200)"],"metadata":{"id":"O3D2eA8HfVs2"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"jdCqrAdPfXkk"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"xXTnlid-fZb3"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(ilrma.loss[1:])\n","plt.show()\n","plt.close()"],"metadata":{"id":"OHjwNcZIfe0K"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## w/o partitioning function"],"metadata":{"id":"3iVGgX3F2M8Z"}},{"cell_type":"code","source":["ilrma = GGDILRMA(\n","    n_basis=2,\n","    beta=1.95,\n","    spatial_algorithm=\"ISS1\",  # You can set \"ISS\" instead of \"ISS1\".\n","    domain=2,\n","    partitioning=False,  # w/o partitioning function\n","    rng=np.random.default_rng(42),\n",")\n","print(ilrma)"],"metadata":{"id":"qsBes0ysf9Sd"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"X6OsBzSZ2Q8Z"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_est = ilrma(spectrogram_mix, n_iter=200)"],"metadata":{"id":"Ccmek_Ek2Q6D"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"7VASi3lZ2Q39"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"ct-qKgs42ZK9"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(ilrma.loss[1:])\n","plt.show()\n","plt.close()"],"metadata":{"id":"SIpKCQTo2ZHl"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"r6q7VzoOzt-T"},"execution_count":null,"outputs":[]}]}

================================================
FILE: notebooks/BSS/ILRMA/GGDILRMA-ISS2-MM.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"iLMRz5h_I_U_"},"outputs":[],"source":["!pip install ssspy"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import matplotlib.pyplot as plt\n","import IPython.display as ipd\n","from tqdm.notebook import tqdm"],"metadata":{"id":"k4vmcNb5em_x"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"rOvxrG-sfp02"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 4\n","max_duration = 10\n","sisec2010_tag = \"dev1_female4\"\n","n_fft, hop_length = 4096, 2048"],"metadata":{"id":"faUwi6X9esWR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=True,\n",")  # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"7jwyi2wReuRR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"Pa28gsTce8yt"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.bss.ilrma import GGDILRMA as GGDILRMABase"],"metadata":{"id":"tixTvLybe-w7"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["class GGDILRMA(GGDILRMABase):\n","    def __init__(self, *args, **kwargs):\n","        super().__init__(*args, **kwargs)\n","\n","        self.progress_bar = None\n","\n","    def __call__(self, *args, n_iter: int = 100, **kwargs):\n","        self.n_iter = n_iter\n","\n","        return super().__call__(*args, n_iter=n_iter, **kwargs)\n","\n","    def update_once(self) -> None:\n","        if self.progress_bar is None:\n","            self.progress_bar = tqdm(total=self.n_iter)\n","\n","        super().update_once()\n","\n","        self.progress_bar.update(1)"],"metadata":{"id":"tXuJbQQ1QPvH"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## w/ partitioning function"],"metadata":{"id":"8ErS0NZ12Gyq"}},{"cell_type":"code","source":["ilrma = GGDILRMA(\n","    n_basis=8,\n","    beta=1.95,\n","    spatial_algorithm=\"ISS2\",\n","    domain=2,\n","    partitioning=True,  # w/ partitioning function\n","    normalization=False,\n","    rng=np.random.default_rng(42),\n",")\n","print(ilrma)"],"metadata":{"id":"h5GghnnMfP1F"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"EecGuY-JfSBB"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_est = ilrma(spectrogram_mix, n_iter=200)"],"metadata":{"id":"O3D2eA8HfVs2"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"jdCqrAdPfXkk"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"xXTnlid-fZb3"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(ilrma.loss[1:])\n","plt.show()\n","plt.close()"],"metadata":{"id":"OHjwNcZIfe0K"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## w/o partitioning function"],"metadata":{"id":"3iVGgX3F2M8Z"}},{"cell_type":"code","source":["ilrma = GGDILRMA(\n","    n_basis=3,\n","    beta=1.95,\n","    spatial_algorithm=\"ISS2\",\n","    domain=2,\n","    partitioning=False,  # w/o partitioning function\n","    rng=np.random.default_rng(42),\n",")\n","print(ilrma)"],"metadata":{"id":"qsBes0ysf9Sd"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, _, spectrogram_mix = ss.stft(waveform_mix, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"X6OsBzSZ2Q8Z"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["spectrogram_est = ilrma(spectrogram_mix, n_iter=200)"],"metadata":{"id":"Ccmek_Ek2Q6D"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["_, waveform_est = ss.istft(spectrogram_est, window=\"hann\", nperseg=n_fft, noverlap=n_fft-hop_length)"],"metadata":{"id":"7VASi3lZ2Q39"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_est):\n","    print(\"Estimated source: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"ct-qKgs42ZK9"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["plt.figure()\n","plt.plot(ilrma.loss[1:])\n","plt.show()\n","plt.close()"],"metadata":{"id":"SIpKCQTo2ZHl"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"r6q7VzoOzt-T"},"execution_count":null,"outputs":[]}]}

================================================
FILE: notebooks/BSS/ILRMA/GaussILRMA-IP1-ME.ipynb
================================================
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[]},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"iLMRz5h_I_U_"},"outputs":[],"source":["!pip install ssspy"]},{"cell_type":"code","source":["import numpy as np\n","import scipy.signal as ss\n","import matplotlib.pyplot as plt\n","import IPython.display as ipd\n","from tqdm.notebook import tqdm"],"metadata":{"id":"k4vmcNb5em_x"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.utils.dataset import download_sample_speech_data"],"metadata":{"id":"rOvxrG-sfp02"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["n_sources = 4\n","max_duration = 10\n","sisec2010_tag = \"dev1_female4\"\n","n_fft, hop_length = 4096, 2048"],"metadata":{"id":"faUwi6X9esWR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["waveform_src_img, sample_rate = download_sample_speech_data(\n","    n_sources=n_sources,\n","    sisec2010_tag=sisec2010_tag,\n","    max_duration=max_duration,\n","    conv=True,\n",")  # (n_channels, n_sources, n_samples)\n","waveform_mix = np.sum(waveform_src_img, axis=1)  # (n_channels, n_samples)"],"metadata":{"id":"7jwyi2wReuRR"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["for idx, waveform in enumerate(waveform_mix):\n","    print(\"Mixture: {}\".format(idx + 1))\n","    display(ipd.Audio(waveform, rate=sample_rate))\n","    print()"],"metadata":{"id":"Pa28gsTce8yt"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from ssspy.bss.ilrma import GaussILRMA as GaussILRMABase"],"metadata":{"id":"tixTvLybe-w7"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["class GaussILRMA(GaussILRMABase):\n","    def __init__(self, *args, **kwargs):\n","        super().__init__(*args, **kwargs)\n","\n","        self.progress_bar = None\n","\n","    def __call__(self, *args, n_iter: int = 100, **kwargs):\n","        self.n_iter = n_iter\n","\n","        return super().__call__(*args, n_iter=n_iter, **kwargs)\n","\n","    def update_once(self) -> None:\n","        if self.progress_bar is None:\n","            self.progress_bar = tqdm(total=self.n_iter)\n","\n","        super().update_once()\n","\n","        self.progress_bar.update(1)"],"metadata":{"id":"B4E
Download .txt
gitextract_c37qrstt/

├── .github/
│   ├── PULL_REQUEST_TEMPLATE.md
│   ├── release.yaml
│   └── workflows/
│       ├── lint.yaml
│       ├── test_docs.yaml
│       ├── test_package_macos-13.yaml
│       ├── test_package_macos-13_python-3.10.yaml
│       ├── test_package_macos-13_python-3.11.yaml
│       ├── test_package_macos-13_python-3.12.yaml
│       ├── test_package_macos-13_python-3.8.yaml
│       ├── test_package_macos-13_python-3.9.yaml
│       ├── test_package_macos-latest.yaml
│       ├── test_package_macos-latest_python-3.10.yaml
│       ├── test_package_macos-latest_python-3.11.yaml
│       ├── test_package_macos-latest_python-3.12.yaml
│       ├── test_package_macos-latest_python-3.8.yaml
│       ├── test_package_macos-latest_python-3.9.yaml
│       ├── test_package_main.yaml
│       ├── test_package_ubuntu-latest.yaml
│       ├── test_package_ubuntu-latest_python-3.10.yaml
│       ├── test_package_ubuntu-latest_python-3.11.yaml
│       ├── test_package_ubuntu-latest_python-3.12.yaml
│       ├── test_package_ubuntu-latest_python-3.8.yaml
│       ├── test_package_ubuntu-latest_python-3.9.yaml
│       ├── test_package_windows-latest.yaml
│       ├── test_package_windows-latest_python-3.10.yaml
│       ├── test_package_windows-latest_python-3.11.yaml
│       ├── test_package_windows-latest_python-3.12.yaml
│       ├── test_package_windows-latest_python-3.8.yaml
│       ├── test_package_windows-latest_python-3.9.yaml
│       └── upload_package.yaml
├── .gitignore
├── .readthedocs.yaml
├── CHANGELOG.rst
├── LICENSE
├── MANIFEST.in
├── README.md
├── codecov.yaml
├── docs/
│   ├── Makefile
│   ├── api.rst
│   ├── changelog.rst
│   ├── conf.py
│   ├── index.rst
│   ├── make.bat
│   ├── pre_build.sh
│   ├── ssspy.algorithm.rst
│   ├── ssspy.bss.admmbss.rst
│   ├── ssspy.bss.base.rst
│   ├── ssspy.bss.cacgmm.rst
│   ├── ssspy.bss.fdica.rst
│   ├── ssspy.bss.hva.rst
│   ├── ssspy.bss.ica.rst
│   ├── ssspy.bss.ilrma.rst
│   ├── ssspy.bss.iva.rst
│   ├── ssspy.bss.mnmf.rst
│   ├── ssspy.bss.pdsbss.rst
│   ├── ssspy.bss.proxbss.rst
│   ├── ssspy.bss.rst
│   ├── ssspy.linalg.rst
│   ├── ssspy.special.rst
│   └── ssspy.transform.rst
├── notebooks/
│   ├── BSS/
│   │   ├── ADMMBSS/
│   │   │   ├── ADMMBSS.ipynb
│   │   │   └── ADMMBSS_multi-penalty.ipynb
│   │   ├── CACGMM/
│   │   │   └── CACGMM.ipynb
│   │   ├── FDICA/
│   │   │   ├── AuxFDICA-IP1.ipynb
│   │   │   ├── AuxFDICA-IP2.ipynb
│   │   │   ├── AuxLaplaceFDICA-IP1.ipynb
│   │   │   ├── AuxLaplaceFDICA-IP2.ipynb
│   │   │   ├── GradFDICA.ipynb
│   │   │   ├── GradLaplaceFDICA.ipynb
│   │   │   ├── NaturalGradFDICA.ipynb
│   │   │   └── NaturalGradLaplaceFDICA.ipynb
│   │   ├── HVA/
│   │   │   ├── ADMM-HVA.ipynb
│   │   │   └── HVA.ipynb
│   │   ├── ICA/
│   │   │   ├── FastICA.ipynb
│   │   │   ├── GradICA.ipynb
│   │   │   └── NaturalGradICA.ipynb
│   │   ├── ILRMA/
│   │   │   ├── GGDILRMA-IP1-MM.ipynb
│   │   │   ├── GGDILRMA-IP2-MM.ipynb
│   │   │   ├── GGDILRMA-ISS1-MM.ipynb
│   │   │   ├── GGDILRMA-ISS2-MM.ipynb
│   │   │   ├── GaussILRMA-IP1-ME.ipynb
│   │   │   ├── GaussILRMA-IP1-MM.ipynb
│   │   │   ├── GaussILRMA-IP2-ME.ipynb
│   │   │   ├── GaussILRMA-IP2-MM.ipynb
│   │   │   ├── GaussILRMA-IPA-ME.ipynb
│   │   │   ├── GaussILRMA-IPA-MM.ipynb
│   │   │   ├── GaussILRMA-ISS1-ME.ipynb
│   │   │   ├── GaussILRMA-ISS1-MM.ipynb
│   │   │   ├── GaussILRMA-ISS2-ME.ipynb
│   │   │   ├── GaussILRMA-ISS2-MM.ipynb
│   │   │   ├── TILRMA-IP1-ME.ipynb
│   │   │   ├── TILRMA-IP1-MM.ipynb
│   │   │   ├── TILRMA-IP2-ME.ipynb
│   │   │   ├── TILRMA-IP2-MM.ipynb
│   │   │   ├── TILRMA-ISS1-ME.ipynb
│   │   │   ├── TILRMA-ISS1-MM.ipynb
│   │   │   ├── TILRMA-ISS2-ME.ipynb
│   │   │   └── TILRMA-ISS2-MM.ipynb
│   │   ├── IPSDTA/
│   │   │   ├── GaussIPSDTA-VCD.ipynb
│   │   │   └── TIPSDTA-VCD.ipynb
│   │   ├── IVA/
│   │   │   ├── AuxGaussIVA-IP1.ipynb
│   │   │   ├── AuxGaussIVA-IP2.ipynb
│   │   │   ├── AuxGaussIVA-IPA.ipynb
│   │   │   ├── AuxGaussIVA-ISS1.ipynb
│   │   │   ├── AuxGaussIVA-ISS2.ipynb
│   │   │   ├── AuxIVA-IP1.ipynb
│   │   │   ├── AuxIVA-IP2.ipynb
│   │   │   ├── AuxIVA-IPA.ipynb
│   │   │   ├── AuxIVA-ISS1.ipynb
│   │   │   ├── AuxIVA-ISS2.ipynb
│   │   │   ├── AuxLaplaceIVA-IP1.ipynb
│   │   │   ├── AuxLaplaceIVA-IP2.ipynb
│   │   │   ├── AuxLaplaceIVA-IPA.ipynb
│   │   │   ├── AuxLaplaceIVA-ISS1.ipynb
│   │   │   ├── AuxLaplaceIVA-ISS2.ipynb
│   │   │   ├── FastIVA.ipynb
│   │   │   ├── FasterIVA.ipynb
│   │   │   ├── GradGaussIVA.ipynb
│   │   │   ├── GradIVA.ipynb
│   │   │   ├── GradLaplaceIVA.ipynb
│   │   │   ├── NaturalGradGaussIVA.ipynb
│   │   │   ├── NaturalGradIVA.ipynb
│   │   │   └── NaturalGradLaplaceIVA.ipynb
│   │   ├── MNMF/
│   │   │   ├── FastGaussMNMF-IP1.ipynb
│   │   │   ├── FastGaussMNMF-IP2.ipynb
│   │   │   └── GaussMNMF.ipynb
│   │   └── PDSBSS/
│   │       ├── PDSBSS.ipynb
│   │       ├── PDSBSS_masking.ipynb
│   │       └── PDSBSS_multi-penalty.ipynb
│   └── Examples/
│       └── Getting-Started.ipynb
├── pyproject.toml
├── ssspy/
│   ├── __init__.py
│   ├── algorithm/
│   │   ├── __init__.py
│   │   ├── minimal_distortion_principle.py
│   │   ├── permutation_alignment.py
│   │   └── projection_back.py
│   ├── bss/
│   │   ├── __init__.py
│   │   ├── _flooring.py
│   │   ├── _psd.py
│   │   ├── _select_pair.py
│   │   ├── _solve_permutation.py
│   │   ├── _update_spatial_model.py
│   │   ├── admmbss.py
│   │   ├── base.py
│   │   ├── cacgmm.py
│   │   ├── fdica.py
│   │   ├── hva.py
│   │   ├── ica.py
│   │   ├── ilrma.py
│   │   ├── ipsdta.py
│   │   ├── iva.py
│   │   ├── mnmf.py
│   │   ├── pdsbss.py
│   │   └── proxbss.py
│   ├── io/
│   │   └── __init__.py
│   ├── linalg/
│   │   ├── __init__.py
│   │   ├── _solve.py
│   │   ├── cubic.py
│   │   ├── eigh.py
│   │   ├── inv.py
│   │   ├── lqpqm.py
│   │   ├── mean.py
│   │   ├── polynomial.py
│   │   ├── prox.py
│   │   ├── quadratic.py
│   │   └── sqrtm.py
│   ├── special/
│   │   ├── __init__.py
│   │   ├── flooring.py
│   │   ├── logsumexp.py
│   │   ├── psd.py
│   │   └── softmax.py
│   ├── transform/
│   │   ├── __init__.py
│   │   ├── pca.py
│   │   └── whiten.py
│   └── utils/
│       ├── __init__.py
│       ├── dataset/
│       │   ├── __init__.py
│       │   ├── mird.py
│       │   └── sisec2010.py
│       ├── flooring.py
│       └── select_pair.py
└── tests/
    ├── conftest.py
    ├── dummy/
    │   ├── callback.py
    │   ├── io.py
    │   └── utils/
    │       └── dataset/
    │           └── __init__.py
    ├── mock/
    │   └── regression/
    │       └── bss/
    │           ├── cacgmm/
    │           │   └── url.json
    │           ├── fdica/
    │           │   ├── aux_laplace_fdica/
    │           │   │   ├── IP1/
    │           │   │   │   └── url.json
    │           │   │   └── IP2/
    │           │   │       └── url.json
    │           │   ├── grad_laplace_fdica/
    │           │   │   ├── holonomic/
    │           │   │   │   └── url.json
    │           │   │   └── nonholonomic/
    │           │   │       └── url.json
    │           │   └── natural_grad_laplace_fdica/
    │           │       ├── holonomic/
    │           │       │   └── url.json
    │           │       └── nonholonomic/
    │           │           └── url.json
    │           ├── ilrma/
    │           │   ├── gauss_ilrma/
    │           │   │   ├── IP1/
    │           │   │   │   ├── ME/
    │           │   │   │   │   └── url.json
    │           │   │   │   └── MM/
    │           │   │   │       └── url.json
    │           │   │   ├── IP2/
    │           │   │   │   ├── ME/
    │           │   │   │   │   └── url.json
    │           │   │   │   └── MM/
    │           │   │   │       └── url.json
    │           │   │   ├── IPA/
    │           │   │   │   ├── ME/
    │           │   │   │   │   └── url.json
    │           │   │   │   └── MM/
    │           │   │   │       └── url.json
    │           │   │   ├── ISS1/
    │           │   │   │   ├── ME/
    │           │   │   │   │   └── url.json
    │           │   │   │   └── MM/
    │           │   │   │       └── url.json
    │           │   │   └── ISS2/
    │           │   │       ├── ME/
    │           │   │       │   └── url.json
    │           │   │       └── MM/
    │           │   │           └── url.json
    │           │   ├── ggd_ilrma/
    │           │   │   ├── IP1/
    │           │   │   │   └── MM/
    │           │   │   │       └── url.json
    │           │   │   ├── IP2/
    │           │   │   │   └── MM/
    │           │   │   │       └── url.json
    │           │   │   ├── ISS1/
    │           │   │   │   └── MM/
    │           │   │   │       └── url.json
    │           │   │   └── ISS2/
    │           │   │       └── MM/
    │           │   │           └── url.json
    │           │   └── t_ilrma/
    │           │       ├── IP1/
    │           │       │   ├── ME/
    │           │       │   │   └── url.json
    │           │       │   └── MM/
    │           │       │       └── url.json
    │           │       ├── IP2/
    │           │       │   ├── ME/
    │           │       │   │   └── url.json
    │           │       │   └── MM/
    │           │       │       └── url.json
    │           │       ├── ISS1/
    │           │       │   ├── ME/
    │           │       │   │   └── url.json
    │           │       │   └── MM/
    │           │       │       └── url.json
    │           │       └── ISS2/
    │           │           ├── ME/
    │           │           │   └── url.json
    │           │           └── MM/
    │           │               └── url.json
    │           ├── ipsdta/
    │           │   ├── gauss_ipsdta/
    │           │   │   └── VCD/
    │           │   │       └── MM/
    │           │   │           └── url.json
    │           │   └── t_ipsdta/
    │           │       └── VCD/
    │           │           └── MM/
    │           │               └── url.json
    │           ├── iva/
    │           │   ├── aux_iva/
    │           │   │   ├── IP1/
    │           │   │   │   └── url.json
    │           │   │   ├── IP2/
    │           │   │   │   └── url.json
    │           │   │   ├── IPA/
    │           │   │   │   └── url.json
    │           │   │   ├── ISS1/
    │           │   │   │   └── url.json
    │           │   │   └── ISS2/
    │           │   │       └── url.json
    │           │   ├── fast_iva/
    │           │   │   └── url.json
    │           │   ├── grad_iva/
    │           │   │   ├── holonomic/
    │           │   │   │   └── url.json
    │           │   │   └── nonholonomic/
    │           │   │       └── url.json
    │           │   └── natural_grad_iva/
    │           │       ├── holonomic/
    │           │       │   └── url.json
    │           │       └── nonholonomic/
    │           │           └── url.json
    │           └── mnmf/
    │               ├── fast_gauss_mnmf/
    │               │   ├── IP1/
    │               │   │   └── url.json
    │               │   └── IP2/
    │               │       └── url.json
    │               └── gauss_mnmf/
    │                   └── url.json
    ├── package/
    │   ├── algorithm/
    │   │   ├── test_minimal_distortion_principle.py
    │   │   ├── test_permutation_alignment.py
    │   │   └── test_projection_back.py
    │   ├── bss/
    │   │   ├── test_admmbss.py
    │   │   ├── test_base.py
    │   │   ├── test_cacgmm.py
    │   │   ├── test_fdica.py
    │   │   ├── test_hva.py
    │   │   ├── test_ica.py
    │   │   ├── test_ilrma.py
    │   │   ├── test_ipsdta.py
    │   │   ├── test_iterative_methods.py
    │   │   ├── test_iva.py
    │   │   ├── test_mnmf.py
    │   │   ├── test_pair_selector.py
    │   │   ├── test_pdsbss.py
    │   │   ├── test_proxbss.py
    │   │   ├── test_psd_legacy.py
    │   │   ├── test_solve_permutation.py
    │   │   └── test_update_spatial_model.py
    │   ├── io/
    │   │   └── test_wavread.py
    │   ├── linalg/
    │   │   ├── test_cubic.py
    │   │   ├── test_eigh.py
    │   │   ├── test_gmean.py
    │   │   ├── test_inv.py
    │   │   ├── test_lqpqm.py
    │   │   ├── test_polynomial.py
    │   │   └── test_sqrtm.py
    │   ├── special/
    │   │   ├── test_logsumexp.py
    │   │   ├── test_psd.py
    │   │   └── test_softmax.py
    │   ├── transform/
    │   │   ├── test_pca.py
    │   │   └── test_whiten.py
    │   └── utils/
    │       ├── test_dataset.py
    │       └── test_select_pair.py
    ├── regression/
    │   └── bss/
    │       ├── test_cacgmm.py
    │       ├── test_fdica.py
    │       ├── test_ilrma.py
    │       ├── test_ipsdta.py
    │       ├── test_iva.py
    │       └── test_mnmf.py
    └── scripts/
        └── download_all.py
Download .txt
SYMBOL INDEX (651 symbols across 88 files)

FILE: ssspy/algorithm/minimal_distortion_principle.py
  function minimal_distortion_principle (line 6) | def minimal_distortion_principle(

FILE: ssspy/algorithm/permutation_alignment.py
  function correlation_based_permutation_solver (line 12) | def correlation_based_permutation_solver(
  function score_based_permutation_solver (line 124) | def score_based_permutation_solver(
  function _parallel_sort (line 270) | def _parallel_sort(X: np.ndarray, indices: np.ndarray) -> np.ndarray:

FILE: ssspy/algorithm/projection_back.py
  function projection_back (line 6) | def projection_back(

FILE: ssspy/bss/_flooring.py
  function identity (line 8) | def identity(input: np.ndarray) -> np.ndarray:
  function max_flooring (line 15) | def max_flooring(input: np.ndarray, eps: float = EPS) -> np.ndarray:
  function add_flooring (line 22) | def add_flooring(input: np.ndarray, eps: float = EPS) -> np.ndarray:

FILE: ssspy/bss/_psd.py
  function to_psd (line 13) | def to_psd(

FILE: ssspy/bss/_select_pair.py
  function sequential_pair_selector (line 8) | def sequential_pair_selector(
  function combination_pair_selector (line 43) | def combination_pair_selector(n_sources: int, sort: bool = False) -> Ite...

FILE: ssspy/bss/_solve_permutation.py
  function correlation_based_permutation_solver (line 15) | def correlation_based_permutation_solver(

FILE: ssspy/bss/_update_spatial_model.py
  function update_by_ip1 (line 17) | def update_by_ip1(
  function update_by_ip2 (line 81) | def update_by_ip2(
  function update_by_iss1 (line 146) | def update_by_iss1(
  function update_by_iss2 (line 197) | def update_by_iss2(
  function update_by_ip2_one_pair (line 317) | def update_by_ip2_one_pair(
  function update_by_ipa (line 398) | def update_by_ipa(
  function update_by_block_decomposition_vcd (line 516) | def update_by_block_decomposition_vcd(
  function _psd_inv (line 611) | def _psd_inv(

FILE: ssspy/bss/admmbss.py
  class ADMMBSSBase (line 15) | class ADMMBSSBase(ProxBSSBase):
    method __repr__ (line 41) | def __repr__(self) -> str:
  class ADMMBSS (line 55) | class ADMMBSS(ADMMBSSBase):
    method __init__ (line 87) | def __init__(
    method __call__ (line 121) | def __call__(self, input, n_iter=100, initial_call: bool = True, **kwa...
    method __repr__ (line 153) | def __repr__(self) -> str:
    method _reset (line 168) | def _reset(self, **kwargs) -> None:
    method update_once (line 220) | def update_once(self) -> None:
  class MaskingADMMBSS (line 260) | class MaskingADMMBSS(ADMMBSSBase):
    method __init__ (line 283) | def __init__(
    method __call__ (line 342) | def __call__(self, input, n_iter=100, initial_call: bool = True, **kwa...
    method _reset (line 357) | def _reset(self, **kwargs) -> None:
    method n_penalties (line 411) | def n_penalties(self) -> int:
    method update_once (line 415) | def update_once(self) -> None:

FILE: ssspy/bss/base.py
  class IterativeMethodBase (line 10) | class IterativeMethodBase:
    method __init__ (line 24) | def __init__(
    method __call__ (line 48) | def __call__(self, *args, n_iter: int = 100, initial_call: bool = True...
    method update_once (line 79) | def update_once(self) -> None:
    method compute_loss (line 83) | def compute_loss(self) -> float:

FILE: ssspy/bss/cacgmm.py
  class CACGMMBase (line 21) | class CACGMMBase(IterativeMethodBase):
    method __init__ (line 46) | def __init__(
    method __call__ (line 78) | def __call__(
    method __repr__ (line 104) | def __repr__(self) -> str:
    method _reset (line 116) | def _reset(
    method _init_parameters (line 158) | def _init_parameters(self, rng: Optional[np.random.Generator] = None) ...
    method separate (line 193) | def separate(self, input: np.ndarray) -> np.ndarray:
    method normalize_covariance (line 207) | def normalize_covariance(self) -> None:
    method compute_loss (line 224) | def compute_loss(self) -> float:
    method compute_logdet (line 232) | def compute_logdet(self, covariance: np.ndarray) -> np.ndarray:
    method solve_permutation (line 246) | def solve_permutation(
    method solve_permutation_by_score (line 290) | def solve_permutation_by_score(
    method solve_permutation_by_correlation (line 373) | def solve_permutation_by_correlation(
  class CACGMM (line 423) | class CACGMM(CACGMMBase):
    method __init__ (line 460) | def __init__(
    method __call__ (line 508) | def __call__(
    method __repr__ (line 546) | def __repr__(self) -> str:
    method separate (line 561) | def separate(self, input: np.ndarray, posterior: Optional[np.ndarray] ...
    method update_once (line 603) | def update_once(
    method update_posterior (line 629) | def update_posterior(
    method update_parameters (line 666) | def update_parameters(
    method compute_loss (line 707) | def compute_loss(self) -> float:

FILE: ssspy/bss/fdica.py
  class FDICABase (line 32) | class FDICABase(IterativeMethodBase):
    method __init__ (line 65) | def __init__(
    method __call__ (line 100) | def __call__(
    method __repr__ (line 128) | def __repr__(self) -> str:
    method _reset (line 141) | def _reset(self, **kwargs) -> None:
    method separate (line 174) | def separate(self, input: np.ndarray, demix_filter: np.ndarray) -> np....
    method compute_loss (line 199) | def compute_loss(self) -> float:
    method compute_logdet (line 225) | def compute_logdet(self, demix_filter: np.ndarray) -> np.ndarray:
    method solve_permutation (line 239) | def solve_permutation(self) -> None:
    method solve_permutation_by_correlation (line 257) | def solve_permutation_by_correlation(
    method restore_scale (line 283) | def restore_scale(self) -> None:
    method apply_projection_back (line 304) | def apply_projection_back(self) -> None:
    method apply_minimal_distortion_principle (line 314) | def apply_minimal_distortion_principle(self) -> None:
  class GradFDICABase (line 329) | class GradFDICABase(FDICABase):
    method __init__ (line 369) | def __init__(
    method __call__ (line 402) | def __call__(
    method __repr__ (line 439) | def __repr__(self) -> str:
    method update_once (line 453) | def update_once(self) -> None:
  class GradFDICA (line 458) | class GradFDICA(GradFDICABase):
    method __init__ (line 552) | def __init__(
    method __repr__ (line 583) | def __repr__(self) -> str:
    method update_once (line 598) | def update_once(self) -> None:
  class NaturalGradFDICA (line 653) | class NaturalGradFDICA(GradFDICABase):
    method __init__ (line 747) | def __init__(
    method __repr__ (line 778) | def __repr__(self) -> str:
    method update_once (line 793) | def update_once(self) -> None:
  class AuxFDICA (line 846) | class AuxFDICA(FDICABase):
    method __init__ (line 946) | def __init__(
    method __call__ (line 983) | def __call__(
    method __repr__ (line 1024) | def __repr__(self) -> str:
    method update_once (line 1038) | def update_once(
    method update_once_ip1 (line 1065) | def update_once_ip1(
    method update_once_ip2 (line 1118) | def update_once_ip2(
  class GradLaplaceFDICA (line 1248) | class GradLaplaceFDICA(GradFDICA):
    method __init__ (line 1317) | def __init__(
    method __repr__ (line 1370) | def __repr__(self) -> str:
  class NaturalGradLaplaceFDICA (line 1386) | class NaturalGradLaplaceFDICA(NaturalGradFDICA):
    method __init__ (line 1455) | def __init__(
    method __repr__ (line 1511) | def __repr__(self) -> str:
  class AuxLaplaceFDICA (line 1527) | class AuxLaplaceFDICA(AuxFDICA):
    method __init__ (line 1603) | def __init__(
    method __repr__ (line 1655) | def __repr__(self) -> str:

FILE: ssspy/bss/hva.py
  class MaskingPDSHVA (line 20) | class MaskingPDSHVA(MaskingPDSBSS):
    method __init__ (line 63) | def __init__(
    method __repr__ (line 138) | def __repr__(self) -> str:
  class MaskingADMMHVA (line 158) | class MaskingADMMHVA(MaskingADMMBSS):
    method __init__ (line 185) | def __init__(
    method __repr__ (line 258) | def __repr__(self) -> str:
  class HVA (line 278) | class HVA(MaskingPDSHVA):
    method __repr__ (line 281) | def __repr__(self) -> str:

FILE: ssspy/bss/ica.py
  class GradICABase (line 11) | class GradICABase(IterativeMethodBase):
    method __init__ (line 33) | def __init__(
    method __call__ (line 59) | def __call__(
    method __repr__ (line 89) | def __repr__(self) -> str:
    method _reset (line 97) | def _reset(self, **kwargs) -> None:
    method update_once (line 129) | def update_once(self) -> None:
    method separate (line 133) | def separate(self, input: np.ndarray, demix_filter: np.ndarray) -> np....
    method compute_loss (line 156) | def compute_loss(self) -> float:
    method compute_logdet (line 180) | def compute_logdet(self, demix_filter: np.ndarray) -> np.ndarray:
  class FastICABase (line 196) | class FastICABase(IterativeMethodBase):
    method __init__ (line 219) | def __init__(
    method __call__ (line 248) | def __call__(
    method __repr__ (line 280) | def __repr__(self) -> str:
    method _reset (line 287) | def _reset(self, **kwargs) -> None:
    method update_once (line 323) | def update_once(self) -> None:
    method separate (line 327) | def separate(
    method compute_loss (line 383) | def compute_loss(self) -> float:
  class GradICA (line 406) | class GradICA(GradICABase):
    method __init__ (line 476) | def __init__(
    method __repr__ (line 497) | def __repr__(self) -> str:
    method update_once (line 506) | def update_once(self) -> None:
  class NaturalGradICA (line 557) | class NaturalGradICA(GradICABase):
    method __init__ (line 631) | def __init__(
    method __repr__ (line 652) | def __repr__(self) -> str:
    method update_once (line 661) | def update_once(self) -> None:
  class FastICA (line 710) | class FastICA(FastICABase):
    method __init__ (line 783) | def __init__(
    method update_once (line 801) | def update_once(self) -> None:
  class GradLaplaceICA (line 844) | class GradLaplaceICA(GradICA):
    method __init__ (line 892) | def __init__(
    method __repr__ (line 916) | def __repr__(self) -> str:
    method update_once (line 925) | def update_once(self) -> None:
    method compute_loss (line 953) | def compute_loss(self) -> float:
  class NaturalGradLaplaceICA (line 969) | class NaturalGradLaplaceICA(NaturalGradICA):
    method __init__ (line 1018) | def __init__(
    method __repr__ (line 1045) | def __repr__(self) -> str:
    method update_once (line 1054) | def update_once(self) -> None:
    method compute_loss (line 1082) | def compute_loss(self) -> float:

FILE: ssspy/bss/ilrma.py
  class ILRMABase (line 32) | class ILRMABase(IterativeMethodBase):
    method __init__ (line 66) | def __init__(
    method __call__ (line 104) | def __call__(
    method __repr__ (line 137) | def __repr__(self) -> str:
    method _reset (line 151) | def _reset(
    method _init_nmf (line 201) | def _init_nmf(
    method separate (line 272) | def separate(self, input: np.ndarray, demix_filter: np.ndarray) -> np....
    method reconstruct_nmf (line 297) | def reconstruct_nmf(
    method update_once (line 329) | def update_once(self) -> None:
    method normalize (line 333) | def normalize(
    method normalize_by_power (line 365) | def normalize_by_power(
    method normalize_by_projection_back (line 446) | def normalize_by_projection_back(self) -> None:
    method compute_loss (line 516) | def compute_loss(self) -> float:
    method compute_logdet (line 524) | def compute_logdet(self, demix_filter: np.ndarray) -> np.ndarray:
    method restore_scale (line 538) | def restore_scale(self) -> None:
    method apply_projection_back (line 557) | def apply_projection_back(self) -> None:
    method apply_minimal_distortion_principle (line 567) | def apply_minimal_distortion_principle(self) -> None:
  class GaussILRMA (line 582) | class GaussILRMA(ILRMABase):
    method __init__ (line 752) | def __init__(
    method __call__ (line 820) | def __call__(
    method __repr__ (line 857) | def __repr__(self) -> str:
    method _reset (line 875) | def _reset(
    method update_once (line 900) | def update_once(
    method update_source_model (line 924) | def update_source_model(
    method update_source_model_mm (line 956) | def update_source_model_mm(
    method update_source_model_me (line 980) | def update_source_model_me(
    method update_latent_mm (line 1007) | def update_latent_mm(self) -> None:
    method update_basis_mm (line 1051) | def update_basis_mm(
    method update_activation_mm (line 1130) | def update_activation_mm(
    method update_latent_me (line 1206) | def update_latent_me(self) -> None:
    method update_basis_me (line 1249) | def update_basis_me(
    method update_activation_me (line 1327) | def update_activation_me(
    method update_spatial_model (line 1403) | def update_spatial_model(
    method update_spatial_model_ip1 (line 1440) | def update_spatial_model_ip1(
    method update_spatial_model_ip2 (line 1509) | def update_spatial_model_ip2(
    method update_spatial_model_iss1 (line 1635) | def update_spatial_model_iss1(
    method update_spatial_model_iss2 (line 1698) | def update_spatial_model_iss2(
    method update_spatial_model_ipa (line 1794) | def update_spatial_model_ipa(
    method compute_loss (line 1910) | def compute_loss(self) -> float:
    method apply_projection_back (line 1969) | def apply_projection_back(self) -> None:
    method apply_minimal_distortion_principle (line 1981) | def apply_minimal_distortion_principle(self) -> None:
  class TILRMA (line 1992) | class TILRMA(ILRMABase):
    method __init__ (line 2145) | def __init__(
    method __call__ (line 2199) | def __call__(
    method __repr__ (line 2236) | def __repr__(self) -> str:
    method _reset (line 2255) | def _reset(
    method update_once (line 2280) | def update_once(
    method update_source_model (line 2304) | def update_source_model(
    method update_source_model_mm (line 2336) | def update_source_model_mm(
    method update_source_model_me (line 2360) | def update_source_model_me(
    method update_latent_mm (line 2384) | def update_latent_mm(self) -> None:
    method update_basis_mm (line 2434) | def update_basis_mm(
    method update_activation_mm (line 2523) | def update_activation_mm(
    method update_latent_me (line 2610) | def update_latent_me(self) -> None:
    method update_basis_me (line 2659) | def update_basis_me(
    method update_activation_me (line 2745) | def update_activation_me(
    method update_spatial_model (line 2829) | def update_spatial_model(
    method update_spatial_model_ip1 (line 2863) | def update_spatial_model_ip1(
    method update_spatial_model_ip2 (line 2944) | def update_spatial_model_ip2(
    method update_spatial_model_iss1 (line 3076) | def update_spatial_model_iss1(
    method update_spatial_model_iss2 (line 3147) | def update_spatial_model_iss2(
    method compute_loss (line 3252) | def compute_loss(self) -> float:
    method apply_projection_back (line 3314) | def apply_projection_back(self) -> None:
    method apply_minimal_distortion_principle (line 3326) | def apply_minimal_distortion_principle(self) -> None:
  class GGDILRMA (line 3337) | class GGDILRMA(ILRMABase):
    method __init__ (line 3490) | def __init__(
    method __call__ (line 3542) | def __call__(
    method __repr__ (line 3579) | def __repr__(self) -> str:
    method _reset (line 3598) | def _reset(
    method update_once (line 3623) | def update_once(
    method update_source_model (line 3647) | def update_source_model(
    method update_source_model_mm (line 3674) | def update_source_model_mm(
    method update_latent_mm (line 3698) | def update_latent_mm(self) -> None:
    method update_basis_mm (line 3745) | def update_basis_mm(
    method update_activation_mm (line 3826) | def update_activation_mm(
    method update_spatial_model (line 3907) | def update_spatial_model(
    method update_spatial_model_ip1 (line 3941) | def update_spatial_model_ip1(
    method update_spatial_model_ip2 (line 4022) | def update_spatial_model_ip2(
    method update_spatial_model_iss1 (line 4154) | def update_spatial_model_iss1(
    method update_spatial_model_iss2 (line 4224) | def update_spatial_model_iss2(
    method compute_loss (line 4329) | def compute_loss(self) -> float:
    method apply_projection_back (line 4390) | def apply_projection_back(self) -> None:
    method apply_minimal_distortion_principle (line 4402) | def apply_minimal_distortion_principle(self) -> None:

FILE: ssspy/bss/ipsdta.py
  class IPSDTABase (line 26) | class IPSDTABase(IterativeMethodBase):
    method __init__ (line 58) | def __init__(
    method __call__ (line 96) | def __call__(self, input: np.ndarray, n_iter: int = 100, **kwargs) -> ...
    method __repr__ (line 124) | def __repr__(self) -> str:
    method _reset (line 137) | def _reset(
    method _init_psdtf (line 185) | def _init_psdtf(
    method separate (line 235) | def separate(self, input: np.ndarray, demix_filter: np.ndarray) -> np....
    method reconstruct_psdtf (line 260) | def reconstruct_psdtf(
    method update_once (line 302) | def update_once(self) -> None:
    method normalize_psdtf (line 306) | def normalize_psdtf(self) -> None:
    method compute_loss (line 319) | def compute_loss(self) -> float:
    method compute_logdet (line 327) | def compute_logdet(self, demix_filter: np.ndarray) -> np.ndarray:
    method restore_scale (line 341) | def restore_scale(self) -> None:
    method apply_projection_back (line 360) | def apply_projection_back(self) -> None:
    method apply_minimal_distortion_principle (line 370) | def apply_minimal_distortion_principle(self) -> None:
  class BlockDecompositionIPSDTABase (line 385) | class BlockDecompositionIPSDTABase(IPSDTABase):
    method __init__ (line 420) | def __init__(
    method __repr__ (line 450) | def __repr__(self) -> str:
    method _reset (line 464) | def _reset(
    method _init_block_decomposition_psdtf (line 512) | def _init_block_decomposition_psdtf(
    method n_remains (line 578) | def n_remains(self) -> int:
    method reconstruct_block_decomposition_psdtf (line 584) | def reconstruct_block_decomposition_psdtf(
    method normalize_block_decomposition_psdtf (line 666) | def normalize_block_decomposition_psdtf(self, axis1: int = -2, axis2: ...
  class GaussIPSDTA (line 700) | class GaussIPSDTA(BlockDecompositionIPSDTABase):
    method __init__ (line 744) | def __init__(
    method __repr__ (line 783) | def __repr__(self) -> str:
    method _reset (line 800) | def _reset(self, **kwargs) -> None:
    method update_once (line 820) | def update_once(
    method update_source_model (line 842) | def update_source_model(
    method update_source_model_mm (line 868) | def update_source_model_mm(
    method update_basis_mm (line 889) | def update_basis_mm(
    method update_activation_mm (line 975) | def update_activation_mm(self) -> None:
    method update_spatial_model (line 1035) | def update_spatial_model(
    method update_spatial_model_vcd (line 1058) | def update_spatial_model_vcd(
    method compute_loss (line 1149) | def compute_loss(self) -> float:
  class TIPSDTA (line 1230) | class TIPSDTA(BlockDecompositionIPSDTABase):
    method __init__ (line 1276) | def __init__(
    method __repr__ (line 1317) | def __repr__(self) -> str:
    method update_once (line 1335) | def update_once(
    method update_source_model (line 1356) | def update_source_model(
    method update_source_model_mm (line 1382) | def update_source_model_mm(
    method update_basis_mm (line 1404) | def update_basis_mm(
    method update_activation_mm (line 1532) | def update_activation_mm(self) -> None:
    method update_spatial_model (line 1634) | def update_spatial_model(
    method update_spatial_model_vcd (line 1657) | def update_spatial_model_vcd(
    method compute_loss (line 1779) | def compute_loss(self) -> float:

FILE: ssspy/bss/iva.py
  class IVABase (line 48) | class IVABase(IterativeMethodBase):
    method __init__ (line 73) | def __init__(
    method __call__ (line 100) | def __call__(
    method __repr__ (line 126) | def __repr__(self) -> str:
    method _reset (line 138) | def _reset(self, **kwargs) -> None:
    method separate (line 171) | def separate(self, input: np.ndarray, demix_filter: np.ndarray) -> np....
    method update_once (line 196) | def update_once(self) -> None:
    method compute_loss (line 200) | def compute_loss(self) -> float:
    method compute_logdet (line 224) | def compute_logdet(self, demix_filter: np.ndarray) -> np.ndarray:
    method restore_scale (line 238) | def restore_scale(self) -> None:
    method apply_projection_back (line 259) | def apply_projection_back(self) -> None:
    method apply_minimal_distortion_principle (line 269) | def apply_minimal_distortion_principle(self) -> None:
  class GradIVABase (line 284) | class GradIVABase(IVABase):
    method __init__ (line 322) | def __init__(
    method __call__ (line 359) | def __call__(
    method __repr__ (line 394) | def __repr__(self) -> str:
  class FastIVABase (line 409) | class FastIVABase(IVABase):
    method __init__ (line 434) | def __init__(
    method __repr__ (line 454) | def __repr__(self) -> str:
    method _reset (line 466) | def _reset(self, **kwargs) -> None:
    method separate (line 478) | def separate(
    method compute_loss (line 511) | def compute_loss(self) -> float:
    method apply_projection_back (line 533) | def apply_projection_back(self) -> None:
  class AuxIVABase (line 553) | class AuxIVABase(IVABase):
    method __init__ (line 585) | def __init__(
    method __call__ (line 609) | def __call__(
    method __repr__ (line 631) | def __repr__(self) -> str:
  class GradIVA (line 644) | class GradIVA(GradIVABase):
    method __init__ (line 736) | def __init__(
    method update_once (line 764) | def update_once(self) -> None:
  class NaturalGradIVA (line 821) | class NaturalGradIVA(GradIVABase):
    method __init__ (line 908) | def __init__(
    method update_once (line 936) | def update_once(self) -> None:
  class FastIVA (line 991) | class FastIVA(FastIVABase):
    method __init__ (line 1064) | def __init__(
    method __call__ (line 1102) | def __call__(
    method __repr__ (line 1138) | def __repr__(self) -> str:
    method update_once (line 1150) | def update_once(
  class FasterIVA (line 1210) | class FasterIVA(FastIVABase):
    method __init__ (line 1275) | def __init__(
    method __call__ (line 1306) | def __call__(
    method __repr__ (line 1342) | def __repr__(self) -> str:
    method update_once (line 1354) | def update_once(
  class AuxIVA (line 1403) | class AuxIVA(AuxIVABase):
    method __init__ (line 1582) | def __init__(
    method __call__ (line 1637) | def __call__(
    method __repr__ (line 1674) | def __repr__(self) -> str:
    method _reset (line 1687) | def _reset(self, **kwargs) -> None:
    method update_once (line 1699) | def update_once(
    method update_once_ip1 (line 1736) | def update_once_ip1(
    method update_once_ip2 (line 1795) | def update_once_ip2(
    method update_once_iss1 (line 1917) | def update_once_iss1(
    method update_once_iss2 (line 1968) | def update_once_iss2(
    method update_once_ipa (line 2068) | def update_once_ipa(
    method compute_loss (line 2177) | def compute_loss(self) -> float:
    method apply_projection_back (line 2194) | def apply_projection_back(self) -> None:
    method apply_minimal_distortion_principle (line 2206) | def apply_minimal_distortion_principle(self) -> None:
  class PDSIVA (line 2217) | class PDSIVA(PDSBSS):
    method __init__ (line 2218) | def __init__(
  class ADMMIVA (line 2280) | class ADMMIVA(ADMMBSS):
    method __init__ (line 2281) | def __init__(
  class GradLaplaceIVA (line 2341) | class GradLaplaceIVA(GradIVA):
    method __init__ (line 2403) | def __init__(
    method update_once (line 2455) | def update_once(self) -> None:
    method compute_loss (line 2488) | def compute_loss(self) -> float:
  class GradGaussIVA (line 2504) | class GradGaussIVA(GradIVA):
    method __init__ (line 2569) | def __init__(
    method _reset (line 2625) | def _reset(self, **kwargs) -> None:
    method update_once (line 2640) | def update_once(self) -> None:
    method update_source_model (line 2646) | def update_source_model(self) -> None:
  class NaturalGradLaplaceIVA (line 2654) | class NaturalGradLaplaceIVA(NaturalGradIVA):
    method __init__ (line 2719) | def __init__(
    method update_once (line 2774) | def update_once(self) -> None:
    method compute_loss (line 2807) | def compute_loss(self) -> float:
  class NaturalGradGaussIVA (line 2823) | class NaturalGradGaussIVA(NaturalGradIVA):
    method __init__ (line 2888) | def __init__(
    method _reset (line 2947) | def _reset(self, **kwargs) -> None:
    method update_once (line 2962) | def update_once(self) -> None:
    method update_source_model (line 2968) | def update_source_model(self) -> None:
  class AuxLaplaceIVA (line 2976) | class AuxLaplaceIVA(AuxIVA):
    method __init__ (line 3078) | def __init__(
  class AuxGaussIVA (line 3131) | class AuxGaussIVA(AuxIVA):
    method __init__ (line 3241) | def __init__(
    method _reset (line 3304) | def _reset(self, **kwargs) -> None:
    method update_once (line 3319) | def update_once(
    method update_once_ip2 (line 3339) | def update_once_ip2(
    method update_source_model (line 3465) | def update_source_model(self) -> None:

FILE: ssspy/bss/mnmf.py
  class MNMFBase (line 21) | class MNMFBase(IterativeMethodBase):
    method __init__ (line 53) | def __init__(
    method __call__ (line 90) | def __call__(
    method __repr__ (line 120) | def __repr__(self) -> str:
    method _reset (line 139) | def _reset(self, **kwargs) -> None:
    method _init_instant_covariance (line 167) | def _init_instant_covariance(
    method _init_nmf (line 190) | def _init_nmf(
    method separate (line 261) | def separate(self, input: np.ndarray) -> np.ndarray:
    method reconstruct_nmf (line 264) | def reconstruct_nmf(
  class MNMF (line 300) | class MNMF(MNMFBase):
    method __init__ (line 301) | def __init__(
    method _init_nmf (line 327) | def _init_nmf(self, rng: Optional[np.random.Generator] = None) -> None:
    method reconstruct_mnmf (line 355) | def reconstruct_mnmf(
    method normalize (line 391) | def normalize(self, axis1=-2, axis2=-1) -> None:
  class FastMNMFBase (line 417) | class FastMNMFBase(MNMFBase):
    method __init__ (line 452) | def __init__(
    method __repr__ (line 480) | def __repr__(self) -> str:
    method _reset (line 499) | def _reset(
    method _init_diagonalizer (line 542) | def _init_diagonalizer(self, rng: Optional[np.random.Generator] = None...
    method _init_spatial (line 566) | def _init_spatial(
    method normalize (line 602) | def normalize(
    method normalize_by_power (line 632) | def normalize_by_power(
  class GaussMNMF (line 681) | class GaussMNMF(MNMF):
    method __init__ (line 682) | def __init__(
    method __repr__ (line 710) | def __repr__(self) -> str:
    method separate (line 729) | def separate(self, input: np.ndarray) -> np.ndarray:
    method compute_loss (line 765) | def compute_loss(self) -> float:
    method compute_logdet (line 791) | def compute_logdet(self, reconstructed: np.ndarray) -> np.ndarray:
    method update_once (line 806) | def update_once(
    method update_basis (line 836) | def update_basis(
    method update_activation (line 903) | def update_activation(
    method update_spatial (line 970) | def update_spatial(
    method update_latent (line 1018) | def update_latent(
  class FastGaussMNMF (line 1076) | class FastGaussMNMF(FastMNMFBase):
    method __init__ (line 1112) | def __init__(
    method __repr__ (line 1155) | def __repr__(self) -> str:
    method separate (line 1174) | def separate(self, input: np.ndarray) -> np.ndarray:
    method compute_loss (line 1219) | def compute_loss(self) -> float:
    method compute_logdet (line 1263) | def compute_logdet(self, diagonalizer: np.ndarray) -> np.ndarray:
    method update_once (line 1278) | def update_once(
    method update_basis (line 1305) | def update_basis(
    method update_activation (line 1362) | def update_activation(
    method update_diagonalizer (line 1419) | def update_diagonalizer(
    method update_diagonalizer_ip1 (line 1449) | def update_diagonalizer_ip1(
    method update_diagonalizer_ip2 (line 1516) | def update_diagonalizer_ip2(
    method update_spatial (line 1635) | def update_spatial(self) -> None:

FILE: ssspy/bss/pdsbss.py
  class PDSBSSBase (line 14) | class PDSBSSBase(ProxBSSBase):
    method __repr__ (line 44) | def __repr__(self) -> str:
  class PDSBSS (line 58) | class PDSBSS(PDSBSSBase):
    method __init__ (line 91) | def __init__(
    method __call__ (line 126) | def __call__(self, input, n_iter=100, initial_call: bool = True, **kwa...
    method __repr__ (line 158) | def __repr__(self) -> str:
    method _reset (line 173) | def _reset(self, **kwargs) -> None:
    method update_once (line 197) | def update_once(self) -> None:
  class MaskingPDSBSS (line 222) | class MaskingPDSBSS(PDSBSSBase):
    method __init__ (line 260) | def __init__(
    method __call__ (line 320) | def __call__(self, input, n_iter=100, initial_call: bool = True, **kwa...
    method __repr__ (line 352) | def __repr__(self) -> str:
    method _reset (line 366) | def _reset(self, **kwargs) -> None:
    method n_penalties (line 392) | def n_penalties(self):
    method update_once (line 396) | def update_once(self) -> None:

FILE: ssspy/bss/proxbss.py
  class ProxBSSBase (line 16) | class ProxBSSBase(IterativeMethodBase):
    method __init__ (line 42) | def __init__(
    method __repr__ (line 94) | def __repr__(self) -> str:
    method _reset (line 107) | def _reset(self, **kwargs) -> None:
    method n_penalties (line 142) | def n_penalties(self):
    method separate (line 147) | def separate(self, input: np.ndarray, demix_filter: np.ndarray) -> np....
    method compute_loss (line 172) | def compute_loss(self) -> float:
    method compute_logdet (line 191) | def compute_logdet(self, demix_filter: np.ndarray) -> np.ndarray:
    method normalize_by_spectral_norm (line 205) | def normalize_by_spectral_norm(self, input: np.ndarray, n_penalties: i...
    method restore_scale (line 225) | def restore_scale(self) -> None:
    method apply_projection_back (line 244) | def apply_projection_back(self) -> None:
    method apply_minimal_distortion_principle (line 254) | def apply_minimal_distortion_principle(self) -> None:

FILE: ssspy/io/__init__.py
  function wavread (line 8) | def wavread(
  function wavwrite (line 56) | def wavwrite(
  function _read_fmt_chunk (line 124) | def _read_fmt_chunk(
  function _read_data_chunk (line 148) | def _read_data_chunk(
  function _write_fmt_chunk (line 195) | def _write_fmt_chunk(
  function _write_data_chunk (line 216) | def _write_data_chunk(f: BufferedWriter, waveform: np.ndarray) -> None:

FILE: ssspy/linalg/_solve.py
  function solve (line 9) | def solve(a: np.ndarray, b: np.ndarray) -> np.ndarray:

FILE: ssspy/linalg/cubic.py
  function cbrt (line 4) | def cbrt(x: np.ndarray) -> np.ndarray:

FILE: ssspy/linalg/eigh.py
  function eigh (line 8) | def eigh(
  function eigh2 (line 84) | def eigh2(
  function _eigh (line 164) | def _eigh(

FILE: ssspy/linalg/inv.py
  function inv2 (line 4) | def inv2(X: np.ndarray) -> np.ndarray:

FILE: ssspy/linalg/lqpqm.py
  function lqpqm2 (line 13) | def lqpqm2(
  function solve_equation (line 123) | def solve_equation(
  function _find_largest_root (line 222) | def _find_largest_root(A: np.ndarray, B: np.ndarray, C: np.ndarray) -> n...
  function _fn (line 295) | def _fn(lamb: np.ndarray, phi: np.ndarray, v: np.ndarray, z: np.ndarray)...
  function _d_fn (line 322) | def _d_fn(

FILE: ssspy/linalg/mean.py
  function gmeanmh (line 6) | def gmeanmh(A: np.ndarray, B: np.ndarray, type: int = 1) -> np.ndarray:

FILE: ssspy/linalg/polynomial.py
  function solve_cubic (line 9) | def solve_cubic(
  function _find_cubic_roots (line 58) | def _find_cubic_roots(P: np.ndarray, Q: np.ndarray) -> np.ndarray:

FILE: ssspy/linalg/prox.py
  function l1 (line 6) | def l1(x, step_size: float = 1) -> np.ndarray:
  function l21 (line 15) | def l21(x: np.ndarray, step_size: float = 1, axis1: int = -2, axis2: int...
  function neg_log (line 36) | def neg_log(x: np.ndarray, step_size: float = 1):
  function neg_logdet (line 62) | def neg_logdet(X: np.ndarray, step_size=1):

FILE: ssspy/linalg/quadratic.py
  function quadratic (line 4) | def quadratic(X: np.ndarray, A: np.ndarray) -> np.ndarray:

FILE: ssspy/linalg/sqrtm.py
  function sqrtmh (line 8) | def sqrtmh(X: np.ndarray) -> np.ndarray:
  function invsqrtmh (line 30) | def invsqrtmh(

FILE: ssspy/special/flooring.py
  function identity (line 6) | def identity(input: np.ndarray) -> np.ndarray:
  function max_flooring (line 11) | def max_flooring(input: np.ndarray, eps: float = EPS) -> np.ndarray:
  function add_flooring (line 16) | def add_flooring(input: np.ndarray, eps: float = EPS) -> np.ndarray:

FILE: ssspy/special/logsumexp.py
  function logsumexp (line 4) | def logsumexp(X: np.ndarray, axis: int = None, keepdims: bool = False) -...

FILE: ssspy/special/psd.py
  function to_psd (line 11) | def to_psd(

FILE: ssspy/special/softmax.py
  function softmax (line 4) | def softmax(X: np.ndarray, axis: int = None) -> np.ndarray:

FILE: ssspy/transform/pca.py
  function pca (line 4) | def pca(input: np.ndarray, ascend: bool = True) -> np.ndarray:

FILE: ssspy/transform/whiten.py
  function whiten (line 4) | def whiten(input: np.ndarray) -> np.ndarray:

FILE: ssspy/utils/dataset/__init__.py
  function download_sample_speech_data (line 13) | def download_sample_speech_data(

FILE: ssspy/utils/dataset/mird.py
  function download (line 10) | def download(root: str = ".data/MIRD", n_sources: int = 3, reverb_durati...
  function resample_mird_rir (line 72) | def resample_mird_rir(rir_path: str, sample_rate_out: int) -> np.ndarray:

FILE: ssspy/utils/dataset/sisec2010.py
  function download (line 10) | def download(root: str = ".data/SiSEC2010", n_sources: int = 3, tag: str...

FILE: ssspy/utils/flooring.py
  function choose_flooring_fn (line 8) | def choose_flooring_fn(

FILE: ssspy/utils/select_pair.py
  function sequential_pair_selector (line 5) | def sequential_pair_selector(
  function combination_pair_selector (line 47) | def combination_pair_selector(n_sources: int, sort: bool = False) -> Ite...

FILE: tests/conftest.py
  function pytest_addoption (line 9) | def pytest_addoption(parser):
  function pytest_configure (line 15) | def pytest_configure():
  function pytest_collection_modifyitems (line 19) | def pytest_collection_modifyitems(config, items):

FILE: tests/dummy/callback.py
  function dummy_function (line 1) | def dummy_function(_) -> None:
  class DummyCallback (line 5) | class DummyCallback:
    method __init__ (line 6) | def __init__(self) -> None:
    method __call__ (line 9) | def __call__(self, _) -> None:

FILE: tests/dummy/io.py
  function save_invalid_wavfile (line 7) | def save_invalid_wavfile(

FILE: tests/dummy/utils/dataset/__init__.py
  function download_sample_speech_data (line 13) | def download_sample_speech_data(
  function download_ssspy_data (line 53) | def download_ssspy_data(path: str, filename: Optional[str] = None, branc...
  function load_regression_data (line 77) | def load_regression_data(root: str, filenames: Optional[List[str]] = Non...

FILE: tests/package/algorithm/test_minimal_distortion_principle.py
  function test_minimal_distortion_principle (line 12) | def test_minimal_distortion_principle(n_sources: int, reference_id: Opti...

FILE: tests/package/algorithm/test_permutation_alignment.py
  function test_correlation_based_permutation_solver (line 15) | def test_correlation_based_permutation_solver(give_demixing_filter: bool):
  function test_score_based_permutation_solver (line 37) | def test_score_based_permutation_solver(give_demixing_filter: bool):

FILE: tests/package/algorithm/test_projection_back.py
  function test_projection_back_demix_filter (line 12) | def test_projection_back_demix_filter(n_sources: int, reference_id: Opti...
  function test_projection_back_output (line 41) | def test_projection_back_output(n_sources: int, reference_id: Optional[i...

FILE: tests/package/bss/test_admmbss.py
  function contrast_fn (line 40) | def contrast_fn(y: np.ndarray) -> np.ndarray:
  function penalty_fn (line 53) | def penalty_fn(y: np.ndarray) -> float:
  function prox_penalty (line 59) | def prox_penalty(y: np.ndarray, step_size: float = 1) -> np.ndarray:
  function test_admmbss_base (line 79) | def test_admmbss_base():
  function test_admmbss (line 86) | def test_admmbss(
  function test_masking_admmbss (line 117) | def test_masking_admmbss(

FILE: tests/package/bss/test_base.py
  function test_iterative_method_base (line 16) | def test_iterative_method_base(

FILE: tests/package/bss/test_cacgmm.py
  function test_cacgmm (line 31) | def test_cacgmm(
  function test_cacgmm_zero_norm (line 78) | def test_cacgmm_zero_norm() -> None:

FILE: tests/package/bss/test_fdica.py
  function test_grad_fdica_base (line 46) | def test_grad_fdica_base(
  function test_grad_fdica (line 66) | def test_grad_fdica(
  function test_natural_grad_fdica (line 107) | def test_natural_grad_fdica(
  function test_aux_fdica (line 151) | def test_aux_fdica(
  function test_grad_laplace_fdica (line 199) | def test_grad_laplace_fdica(
  function test_natural_grad_laplace_fdica (line 233) | def test_natural_grad_laplace_fdica(
  function test_aux_laplace_fdica (line 271) | def test_aux_laplace_fdica(

FILE: tests/package/bss/test_hva.py
  function test_masking_pdshva (line 29) | def test_masking_pdshva(
  function test_masking_admmhva (line 61) | def test_masking_admmhva(
  function test_hva (line 93) | def test_hva(

FILE: tests/package/bss/test_ica.py
  function test_grad_ica_base (line 35) | def test_grad_ica_base(
  function test_grad_ica (line 55) | def test_grad_ica(
  function test_natural_grad_ica (line 89) | def test_natural_grad_ica(
  function test_grad_laplace_ica (line 123) | def test_grad_laplace_ica(
  function test_natural_grad_laplace_ica (line 149) | def test_natural_grad_laplace_ica(
  function test_fast_ica (line 174) | def test_fast_ica(

FILE: tests/package/bss/test_ilrma.py
  function test_ilrma_base (line 65) | def test_ilrma_base(
  function test_gauss_ilrma_latent (line 90) | def test_gauss_ilrma_latent(
  function test_gauss_ilrma_wo_latent (line 161) | def test_gauss_ilrma_wo_latent(
  function test_t_ilrma_latent (line 233) | def test_t_ilrma_latent(
  function test_t_ilrma_wo_latent (line 312) | def test_t_ilrma_wo_latent(
  function test_ggd_ilrma_latent (line 391) | def test_ggd_ilrma_latent(
  function test_ggd_ilrma_wo_latent (line 470) | def test_ggd_ilrma_wo_latent(

FILE: tests/package/bss/test_ipsdta.py
  function test_ipsdta_base (line 45) | def test_ipsdta_base(
  function test_block_decomposition_ipsdta_base (line 71) | def test_block_decomposition_ipsdta_base(
  function test_gauss_ipsdta (line 102) | def test_gauss_ipsdta(
  function test_t_ipsdta (line 164) | def test_t_ipsdta(

FILE: tests/package/bss/test_iterative_methods.py
  function test_grad_ica_inheritance (line 34) | def test_grad_ica_inheritance() -> None:
  function test_natural_grad_ica_inheritance (line 50) | def test_natural_grad_ica_inheritance() -> None:
  function test_fast_ica_inheritance (line 66) | def test_fast_ica_inheritance() -> None:
  function test_grad_fdica_inheritance (line 82) | def test_grad_fdica_inheritance() -> None:
  function test_natural_grad_fdica_inheritance (line 99) | def test_natural_grad_fdica_inheritance() -> None:
  function test_aux_fdica_inheritance (line 116) | def test_aux_fdica_inheritance() -> None:
  function test_grad_iva_inheritance (line 135) | def test_grad_iva_inheritance() -> None:
  function test_natural_grad_iva_inheritance (line 177) | def test_natural_grad_iva_inheritance() -> None:
  function test_fast_iva_inheritance (line 219) | def test_fast_iva_inheritance() -> None:
  function test_faster_iva_inheritance (line 268) | def test_faster_iva_inheritance() -> None:
  function test_aux_iva_inheritance (line 300) | def test_aux_iva_inheritance() -> None:
  function test_pds_iva_inheritance (line 343) | def test_pds_iva_inheritance() -> None:
  function test_ilrma_inheritance (line 352) | def test_ilrma_inheritance() -> None:
  function test_ipsdta_inheritance (line 368) | def test_ipsdta_inheritance() -> None:
  function test_mnmf_inheritance (line 381) | def test_mnmf_inheritance() -> None:
  function test_pdsbss_inheritance (line 393) | def test_pdsbss_inheritance() -> None:
  function test_cacgmm_inheritance (line 431) | def test_cacgmm_inheritance() -> None:

FILE: tests/package/bss/test_iva.py
  function test_iva_base (line 81) | def test_iva_base(
  function test_fast_iva_base (line 90) | def test_fast_iva_base(
  function test_grad_iva_base (line 102) | def test_grad_iva_base(
  function test_grad_iva (line 146) | def test_grad_iva(
  function test_natural_grad_iva (line 208) | def test_natural_grad_iva(
  function test_fast_iva (line 271) | def test_fast_iva(
  function test_faster_iva (line 346) | def test_faster_iva(
  function test_aux_iva_base (line 403) | def test_aux_iva_base(
  function test_aux_iva (line 449) | def test_aux_iva(
  function test_pds_iva (line 521) | def test_pds_iva(
  function test_iva_insufficient_fn (line 557) | def test_iva_insufficient_fn(specify_contrast_fn: bool):
  function test_grad_laplace_iva (line 587) | def test_grad_laplace_iva(
  function test_grad_gauss_iva (line 621) | def test_grad_gauss_iva(
  function test_natural_grad_laplace_iva (line 655) | def test_natural_grad_laplace_iva(
  function test_natural_grad_gauss_iva (line 691) | def test_natural_grad_gauss_iva(
  function test_aux_laplace_iva (line 726) | def test_aux_laplace_iva(
  function test_aux_gauss_iva (line 775) | def test_aux_gauss_iva(

FILE: tests/package/bss/test_mnmf.py
  function test_mnmf_base (line 36) | def test_mnmf_base(
  function test_fast_mnmf_base (line 55) | def test_fast_mnmf_base(
  function test_gauss_mnmf (line 81) | def test_gauss_mnmf(
  function test_fast_gauss_mnmf (line 137) | def test_fast_gauss_mnmf(

FILE: tests/package/bss/test_pair_selector.py
  function test_sequential_pair_selector (line 13) | def test_sequential_pair_selector(n_sources: int, step: int, ascend: bool):
  function test_combination_pair_selector (line 25) | def test_combination_pair_selector(n_sources: int, ascend: bool):

FILE: tests/package/bss/test_pdsbss.py
  function contrast_fn (line 30) | def contrast_fn(y: np.ndarray) -> np.ndarray:
  function penalty_fn (line 43) | def penalty_fn(y: np.ndarray) -> float:
  function prox_penalty (line 49) | def prox_penalty(y: np.ndarray, step_size: float = 1) -> np.ndarray:
  function mask_fn (line 65) | def mask_fn(y: np.ndarray, step_size: float = 1) -> np.ndarray:
  function test_pds_base (line 84) | def test_pds_base():
  function test_pdsbss (line 92) | def test_pdsbss(
  function test_masking_pdsbss (line 128) | def test_masking_pdsbss(

FILE: tests/package/bss/test_proxbss.py
  function contrast_fn (line 6) | def contrast_fn(y: np.ndarray) -> np.ndarray:
  function penalty_fn (line 19) | def penalty_fn(y: np.ndarray) -> float:
  function prox_penalty (line 25) | def prox_penalty(y: np.ndarray, step_size: float = 1) -> np.ndarray:
  function test_proxbss_base (line 41) | def test_proxbss_base() -> None:

FILE: tests/package/bss/test_psd_legacy.py
  function test_to_psd_real (line 17) | def test_to_psd_real(shape: Tuple[int], kwargs):
  function test_to_psd_complex (line 29) | def test_to_psd_complex(shape: Tuple[int], kwargs):

FILE: tests/package/bss/test_solve_permutation.py
  function test_correlation_based_permutation_solver (line 12) | def test_correlation_based_permutation_solver(give_demixing_filter: bool):

FILE: tests/package/bss/test_update_spatial_model.py
  function negative_pair_selector (line 19) | def negative_pair_selector(n_sources):
  function test_update_by_ip1 (line 48) | def test_update_by_ip1(
  function test_update_by_ip2 (line 77) | def test_update_by_ip2(
  function test_update_by_ip2_one_pair (line 106) | def test_update_by_ip2_one_pair(
  function test_update_by_iss1 (line 133) | def test_update_by_iss1(
  function test_update_by_iss2 (line 155) | def test_update_by_iss2(
  function test_update_by_block_decomposition_vcd (line 178) | def test_update_by_block_decomposition_vcd(
  function test_psd_inv (line 212) | def test_psd_inv() -> None:

FILE: tests/package/io/test_wavread.py
  function test_wavread_monoral (line 22) | def test_wavread_monoral(frame_offset: int, num_frames: int, channels_fi...
  function test_wavread_stereo (line 63) | def test_wavread_stereo(frame_offset: int, num_frames: int, channels_fir...
  function test_wavread_invalid_monoral (line 91) | def test_wavread_invalid_monoral(frame_offset: int):
  function test_wavread_invalid_stereo (line 113) | def test_wavread_invalid_stereo(frame_offset: int):
  function test_wavio_1d (line 135) | def test_wavio_1d(is_float: np.dtype):
  function test_wavio_2d (line 165) | def test_wavio_2d(is_float: np.dtype, n_channels: int, channels_first: b...
  function test_waveread_invalid_metadata (line 202) | def test_waveread_invalid_metadata():

FILE: tests/package/linalg/test_cubic.py
  function test_cbrt (line 6) | def test_cbrt():

FILE: tests/package/linalg/test_eigh.py
  function test_eigh (line 17) | def test_eigh(n_sources: int, n_channels: int, n_frames: int, is_complex...
  function test_generalized_eigh (line 42) | def test_generalized_eigh(
  function test_eigh2 (line 78) | def test_eigh2(n_sources: int, n_frames: int, is_complex: bool):
  function test_generalized_eigh2 (line 102) | def test_generalized_eigh2(n_sources: int, n_frames: int, is_complex: bo...

FILE: tests/package/linalg/test_gmean.py
  function gmeanmh_scipy (line 10) | def gmeanmh_scipy(A: np.ndarray, B: np.ndarray, inverse="left") -> np.nd...
  function test_gmean (line 28) | def test_gmean(type: int):

FILE: tests/package/linalg/test_inv.py
  function test_inv2 (line 10) | def test_inv2(n_sources: int):

FILE: tests/package/linalg/test_lqpqm.py
  function test_find_largest_root (line 6) | def test_find_largest_root():

FILE: tests/package/linalg/test_polynomial.py
  function test_find_cubic_roots (line 6) | def test_find_cubic_roots():
  function test_solve_cubic (line 19) | def test_solve_cubic():

FILE: tests/package/linalg/test_sqrtm.py
  function test_sqrtmh (line 17) | def test_sqrtmh(n_sources: int, n_channels: int, n_frames: int, is_compl...
  function test_invsqrtmh (line 39) | def test_invsqrtmh(

FILE: tests/package/special/test_logsumexp.py
  function test_logsumexp (line 15) | def test_logsumexp(axis: Optional[int], keepdims: bool):

FILE: tests/package/special/test_psd.py
  function test_to_psd_real (line 16) | def test_to_psd_real(shape: Tuple[int], kwargs):
  function test_to_psd_complex (line 28) | def test_to_psd_complex(shape: Tuple[int], kwargs):

FILE: tests/package/special/test_softmax.py
  function test_logsumexp (line 13) | def test_logsumexp(axis: Optional[int]):

FILE: tests/package/transform/test_pca.py
  function test_pca_real_2d (line 16) | def test_pca_real_2d(ascend: bool, n_channels: int, n_samples: int):
  function test_pca_real_3d (line 36) | def test_pca_real_3d(ascend: bool, batch_size: int, n_channels: int, n_s...
  function test_pca_complex_3d (line 55) | def test_pca_complex_3d(ascend: bool, n_channels: int, n_bins: int, n_fr...
  function test_pca_complex_4d (line 78) | def test_pca_complex_4d(ascend: bool, batch_size: int, n_channels: int, ...

FILE: tests/package/transform/test_whiten.py
  function test_whiten_real_2d (line 14) | def test_whiten_real_2d(n_channels: int, n_samples: int):
  function test_whiten_real_3d (line 32) | def test_whiten_real_3d(batch_size: int, n_channels: int, n_samples: int):
  function test_whiten_complex_3d (line 49) | def test_whiten_complex_3d(n_channels: int, n_bins: int, n_frames: int):
  function test_whiten_complex_4d (line 71) | def test_whiten_complex_4d(batch_size: int, n_channels: int, n_bins: int...

FILE: tests/package/utils/test_dataset.py
  function test_conv_dataset (line 17) | def test_conv_dataset(n_sources: int, sisec2010_tag: str, max_duration: ...

FILE: tests/package/utils/test_select_pair.py
  function test_sequential_pair_selector (line 13) | def test_sequential_pair_selector(n_sources: int, step: int, ascend: bool):
  function test_combination_pair_selector (line 21) | def test_combination_pair_selector(n_sources: int, ascend: bool):

FILE: tests/regression/bss/test_cacgmm.py
  function test_cacgmm (line 17) | def test_cacgmm(save_feature: bool = False):
  function save_all_features (line 49) | def save_all_features() -> None:

FILE: tests/regression/bss/test_fdica.py
  function test_grad_laplace_fdica (line 24) | def test_grad_laplace_fdica(is_holonomic: bool, save_feature: bool = Fal...
  function test_natural_grad_laplace_fdica (line 59) | def test_natural_grad_laplace_fdica(is_holonomic: bool, save_feature: bo...
  function test_aux_laplace_fdica (line 95) | def test_aux_laplace_fdica(spatial_algorithm: str, save_feature: bool = ...
  function save_all_features (line 127) | def save_all_features() -> None:

FILE: tests/regression/bss/test_ilrma.py
  function test_gauss_ilrma (line 23) | def test_gauss_ilrma(spatial_algorithm: str, source_algorithm: str, save...
  function test_t_ilrma (line 82) | def test_t_ilrma(spatial_algorithm: str, source_algorithm: str, save_fea...
  function test_ggd_ilrma (line 148) | def test_ggd_ilrma(spatial_algorithm: str, source_algorithm: str, save_f...
  function save_all_features (line 215) | def save_all_features() -> None:

FILE: tests/regression/bss/test_ipsdta.py
  function test_gauss_ipsdta (line 23) | def test_gauss_ipsdta(spatial_algorithm: str, source_algorithm: str, sav...
  function test_t_ipsdta (line 123) | def test_t_ipsdta(spatial_algorithm: str, source_algorithm: str, save_fe...
  function save_all_features (line 225) | def save_all_features() -> None:

FILE: tests/regression/bss/test_iva.py
  function test_grad_iva (line 22) | def test_grad_iva(is_holonomic: bool, save_feature: bool = False):
  function test_natural_grad_iva (line 90) | def test_natural_grad_iva(is_holonomic: bool, save_feature: bool = False):
  function test_aux_iva (line 158) | def test_aux_iva(spatial_algorithm: str, save_feature: bool = False):
  function test_fast_iva (line 220) | def test_fast_iva(save_feature: bool = False):
  function save_all_features (line 295) | def save_all_features() -> None:

FILE: tests/regression/bss/test_mnmf.py
  function test_gauss_mnmf (line 20) | def test_gauss_mnmf(save_feature: bool = False):
  function test_fast_gauss_mnmf (line 86) | def test_fast_gauss_mnmf(diagonalizer_algorithm: str, save_feature: bool...
  function save_all_features (line 153) | def save_all_features() -> None:

FILE: tests/scripts/download_all.py
  function download_all (line 12) | def download_all() -> None:
Condensed preview — 270 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,421K chars).
[
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "chars": 100,
    "preview": "## Summary\n<!-- Describe brief summary of this PR. -->\n\n<!--\n\n## TODO\nDescribe what to do next.\n\n-->"
  },
  {
    "path": ".github/release.yaml",
    "chars": 331,
    "preview": "changelog:\n  categories:\n    - title: Breaking Changes 🛠\n      labels:\n        - breaking changes\n    - title: New Featu"
  },
  {
    "path": ".github/workflows/lint.yaml",
    "chars": 804,
    "preview": "name: lint\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  lint:\n    name: Run"
  },
  {
    "path": ".github/workflows/test_docs.yaml",
    "chars": 693,
    "preview": "name: tests for docs\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  build:\n  "
  },
  {
    "path": ".github/workflows/test_package_macos-13.yaml",
    "chars": 710,
    "preview": "name: macos-13\non:\n  workflow_call:\n    inputs:\n      python-version:\n        required: true\n        type: string\n    se"
  },
  {
    "path": ".github/workflows/test_package_macos-13_python-3.10.yaml",
    "chars": 379,
    "preview": "name: macos-13/3.10\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  package:\n "
  },
  {
    "path": ".github/workflows/test_package_macos-13_python-3.11.yaml",
    "chars": 379,
    "preview": "name: macos-13/3.11\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  package:\n "
  },
  {
    "path": ".github/workflows/test_package_macos-13_python-3.12.yaml",
    "chars": 379,
    "preview": "name: macos-13/3.12\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  package:\n "
  },
  {
    "path": ".github/workflows/test_package_macos-13_python-3.8.yaml",
    "chars": 377,
    "preview": "name: macos-13/3.8\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  package:\n  "
  },
  {
    "path": ".github/workflows/test_package_macos-13_python-3.9.yaml",
    "chars": 377,
    "preview": "name: macos-13/3.9\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  package:\n  "
  },
  {
    "path": ".github/workflows/test_package_macos-latest.yaml",
    "chars": 718,
    "preview": "name: macos-latest\non:\n  workflow_call:\n    inputs:\n      python-version:\n        required: true\n        type: string\n  "
  },
  {
    "path": ".github/workflows/test_package_macos-latest_python-3.10.yaml",
    "chars": 387,
    "preview": "name: macos-latest/3.10\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  packag"
  },
  {
    "path": ".github/workflows/test_package_macos-latest_python-3.11.yaml",
    "chars": 387,
    "preview": "name: macos-latest/3.11\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  packag"
  },
  {
    "path": ".github/workflows/test_package_macos-latest_python-3.12.yaml",
    "chars": 387,
    "preview": "name: macos-latest/3.12\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  packag"
  },
  {
    "path": ".github/workflows/test_package_macos-latest_python-3.8.yaml",
    "chars": 385,
    "preview": "name: macos-latest/3.8\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  package"
  },
  {
    "path": ".github/workflows/test_package_macos-latest_python-3.9.yaml",
    "chars": 385,
    "preview": "name: macos-latest/3.9\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  package"
  },
  {
    "path": ".github/workflows/test_package_main.yaml",
    "chars": 1954,
    "preview": "name: test package\non:\n  workflow_call:\n    inputs:\n      os:\n        required: true\n        type: string\n      python-v"
  },
  {
    "path": ".github/workflows/test_package_ubuntu-latest.yaml",
    "chars": 545,
    "preview": "name: ubuntu-latest\non:\n  workflow_call:\n    inputs:\n      python-version:\n        required: true\n        type: string\n "
  },
  {
    "path": ".github/workflows/test_package_ubuntu-latest_python-3.10.yaml",
    "chars": 389,
    "preview": "name: ubuntu-latest/3.10\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  packa"
  },
  {
    "path": ".github/workflows/test_package_ubuntu-latest_python-3.11.yaml",
    "chars": 389,
    "preview": "name: ubuntu-latest/3.11\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  packa"
  },
  {
    "path": ".github/workflows/test_package_ubuntu-latest_python-3.12.yaml",
    "chars": 389,
    "preview": "name: ubuntu-latest/3.12\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  packa"
  },
  {
    "path": ".github/workflows/test_package_ubuntu-latest_python-3.8.yaml",
    "chars": 387,
    "preview": "name: ubuntu-latest/3.8\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  packag"
  },
  {
    "path": ".github/workflows/test_package_ubuntu-latest_python-3.9.yaml",
    "chars": 387,
    "preview": "name: ubuntu-latest/3.9\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  packag"
  },
  {
    "path": ".github/workflows/test_package_windows-latest.yaml",
    "chars": 547,
    "preview": "name: windows-latest\non:\n  workflow_call:\n    inputs:\n      python-version:\n        required: true\n        type: string\n"
  },
  {
    "path": ".github/workflows/test_package_windows-latest_python-3.10.yaml",
    "chars": 391,
    "preview": "name: windows-latest/3.10\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  pack"
  },
  {
    "path": ".github/workflows/test_package_windows-latest_python-3.11.yaml",
    "chars": 391,
    "preview": "name: windows-latest/3.11\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  pack"
  },
  {
    "path": ".github/workflows/test_package_windows-latest_python-3.12.yaml",
    "chars": 391,
    "preview": "name: windows-latest/3.12\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  pack"
  },
  {
    "path": ".github/workflows/test_package_windows-latest_python-3.8.yaml",
    "chars": 389,
    "preview": "name: windows-latest/3.8\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  packa"
  },
  {
    "path": ".github/workflows/test_package_windows-latest_python-3.9.yaml",
    "chars": 389,
    "preview": "name: windows-latest/3.9\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\njobs:\n  packa"
  },
  {
    "path": ".github/workflows/upload_package.yaml",
    "chars": 1197,
    "preview": "# based on \n# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python\n# https://githu"
  },
  {
    "path": ".gitignore",
    "chars": 1890,
    "preview": "# For building docs\ndocs/_notebooks/\n\n# For local\n.data/\n_version.py\n\n# For Mac\n.DS_Store\n\n# Byte-compiled / optimized /"
  },
  {
    "path": ".readthedocs.yaml",
    "chars": 813,
    "preview": "# .readthedocs.yaml\n# Read the Docs configuration file\n# See https://docs.readthedocs.io/en/stable/config-file/v2.html f"
  },
  {
    "path": "CHANGELOG.rst",
    "chars": 4687,
    "preview": "Changelog\n#########\n\nv0.2.0\n******\n\nWhat's Changed\n==============\n\nBreaking Changes 🛠\n-------------------\n* Rename `aux`"
  },
  {
    "path": "LICENSE",
    "chars": 11343,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "MANIFEST.in",
    "chars": 116,
    "preview": "exclude .gitignore\nexclude *.yaml\nrecursive-include ssspy *.py\nprune .github\nprune tests\nprune docs\nprune notebooks\n"
  },
  {
    "path": "README.md",
    "chars": 26998,
    "preview": "# ssspy\n[![Documentation Status](https://readthedocs.org/projects/sound-source-separation-python/badge/?version=latest)]"
  },
  {
    "path": "codecov.yaml",
    "chars": 160,
    "preview": "coverage:\n  status:\n    project:\n      default:\n        target: auto\n        threshold: 1%\n    patch:\n      default:\n   "
  },
  {
    "path": "docs/Makefile",
    "chars": 634,
    "preview": "# Minimal makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line, and also\n# from the "
  },
  {
    "path": "docs/api.rst",
    "chars": 1692,
    "preview": "APIs\n====\n\nIntroduction\n------------\n\n.. code-block:: python\n\n   import numpy as np\n   import scipy.signal as ss\n   impo"
  },
  {
    "path": "docs/changelog.rst",
    "chars": 30,
    "preview": ".. include:: ../CHANGELOG.rst\n"
  },
  {
    "path": "docs/conf.py",
    "chars": 1955,
    "preview": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common op"
  },
  {
    "path": "docs/index.rst",
    "chars": 10163,
    "preview": ".. ssspy documentation master file, created by\n   sphinx-quickstart on Fri Apr 29 20:59:12 2022.\n   You can adapt this f"
  },
  {
    "path": "docs/make.bat",
    "chars": 800,
    "preview": "@ECHO OFF\r\n\r\npushd %~dp0\r\n\r\nREM Command file for Sphinx documentation\r\n\r\nif \"%SPHINXBUILD%\" == \"\" (\r\n\tset SPHINXBUILD=sp"
  },
  {
    "path": "docs/pre_build.sh",
    "chars": 227,
    "preview": "#!/bin/bash\n\n# TODO: unify .readthedocs.yaml\npip install -e \".[docs,notebooks]\"\n\n# convert .ipynb to .rst format.\njupyte"
  },
  {
    "path": "docs/ssspy.algorithm.rst",
    "chars": 176,
    "preview": "ssspy.algorithm\n===============\n\n``ssspy.algorithm`` provides algorithms related to source separation.\n\nAlgorithms\n~~~~~"
  },
  {
    "path": "docs/ssspy.bss.admmbss.rst",
    "chars": 201,
    "preview": "ssspy.bss.admmbss\n=================\n\nAlgorithms\n~~~~~~~~~~\n.. autoclass:: ssspy.bss.admmbss.ADMMBSSBase\n\n.. autoclass:: "
  },
  {
    "path": "docs/ssspy.bss.base.rst",
    "chars": 241,
    "preview": "ssspy.bss.base\n==============\n\nIn this module, we provide base class of blind source separation methods.\n\nAlgorithms\n~~~"
  },
  {
    "path": "docs/ssspy.bss.cacgmm.rst",
    "chars": 279,
    "preview": "ssspy.bss.cacgmm\n================\n\nAlgorithms\n~~~~~~~~~~\n.. autoclass:: ssspy.bss.cacgmm.CACGMM\n    :special-members: __"
  },
  {
    "path": "docs/ssspy.bss.fdica.rst",
    "chars": 2989,
    "preview": "ssspy.bss.fdica\n===============\n\nIn this module, we separate multichannel signals\nusing frequency-domain independent com"
  },
  {
    "path": "docs/ssspy.bss.hva.rst",
    "chars": 173,
    "preview": "ssspy.bss.hva\n=============\n\nAlgorithms\n~~~~~~~~~~\n.. autoclass:: ssspy.bss.hva.MaskingPDSHVA\n\n.. autoclass:: ssspy.bss."
  },
  {
    "path": "docs/ssspy.bss.ica.rst",
    "chars": 2833,
    "preview": "ssspy.bss.ica\n=============\n\nIn this module, we separate time-domain multichannel signals\nusing independent component an"
  },
  {
    "path": "docs/ssspy.bss.ilrma.rst",
    "chars": 3565,
    "preview": "ssspy.bss.ilrma\n===============\n\nIn this module, we separate multichannel signals\nusing independent low-rank matrix anal"
  },
  {
    "path": "docs/ssspy.bss.iva.rst",
    "chars": 3941,
    "preview": "ssspy.bss.iva\n=============\n\nIn this module, we separate multichannel signals\nusing independent vector analysis (IVA).\nW"
  },
  {
    "path": "docs/ssspy.bss.mnmf.rst",
    "chars": 458,
    "preview": "ssspy.bss.mnmf\n==============\n\n\nAlgorithms\n~~~~~~~~~~\n.. autoclass:: ssspy.bss.mnmf.FastMNMFBase\n    :special-members: _"
  },
  {
    "path": "docs/ssspy.bss.pdsbss.rst",
    "chars": 4817,
    "preview": "ssspy.bss.pdsbss\n================\n\nIn this module, we separate multichannel signals\nusing blind source separation via pr"
  },
  {
    "path": "docs/ssspy.bss.proxbss.rst",
    "chars": 290,
    "preview": "ssspy.bss.proxbss\n=================\n\nAlgorithms\n~~~~~~~~~~\n.. autoclass:: ssspy.bss.proxbss.ProxBSSBase\n    :special-mem"
  },
  {
    "path": "docs/ssspy.bss.rst",
    "chars": 346,
    "preview": "ssspy.bss\n=========\n\n``ssspy.bss`` provides various blind source separation methods.\n\nSubmodules\n~~~~~~~~~~\n\n.. toctree:"
  },
  {
    "path": "docs/ssspy.linalg.rst",
    "chars": 312,
    "preview": "ssspy.linalg\n============\n\n``ssspy.linalg`` is linear algebra module related to source separation.\n\nAlgorithms\n~~~~~~~~~"
  },
  {
    "path": "docs/ssspy.special.rst",
    "chars": 194,
    "preview": "ssspy.special\n=============\n\n``ssspy.special`` is a module related to special function.\n\nAlgorithms\n~~~~~~~~~~\n.. autofu"
  },
  {
    "path": "docs/ssspy.transform.rst",
    "chars": 206,
    "preview": "ssspy.transform\n===============\n\n``ssspy.transform`` provides transforms related to source separation.\n\nAlgorithms\n~~~~~"
  },
  {
    "path": "notebooks/BSS/ADMMBSS/ADMMBSS.ipynb",
    "chars": 4734,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[],\"authorship_tag\":\"ABX9TyPQC07HvYHC5TQxnCCmzCwE\"},\""
  },
  {
    "path": "notebooks/BSS/ADMMBSS/ADMMBSS_multi-penalty.ipynb",
    "chars": 6272,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[],\"authorship_tag\":\"ABX9TyOoGT5woLRACpymG/HuTm0y\"},\""
  },
  {
    "path": "notebooks/BSS/CACGMM/CACGMM.ipynb",
    "chars": 3931,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/FDICA/AuxFDICA-IP1.ipynb",
    "chars": 3599,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/FDICA/AuxFDICA-IP2.ipynb",
    "chars": 3557,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/FDICA/AuxLaplaceFDICA-IP1.ipynb",
    "chars": 3325,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/FDICA/AuxLaplaceFDICA-IP2.ipynb",
    "chars": 3283,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/FDICA/GradFDICA.ipynb",
    "chars": 5231,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/FDICA/GradLaplaceFDICA.ipynb",
    "chars": 4884,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/FDICA/NaturalGradFDICA.ipynb",
    "chars": 5074,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/FDICA/NaturalGradLaplaceFDICA.ipynb",
    "chars": 4727,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/HVA/ADMM-HVA.ipynb",
    "chars": 3273,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[],\"authorship_tag\":\"ABX9TyOmTvOlLp1H2ygKo0T05BU4\"},\""
  },
  {
    "path": "notebooks/BSS/HVA/HVA.ipynb",
    "chars": 3264,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[],\"authorship_tag\":\"ABX9TyMJFxbBzvXESFspRTOKnHrj\"},\""
  },
  {
    "path": "notebooks/BSS/ICA/FastICA.ipynb",
    "chars": 2915,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ICA/GradICA.ipynb",
    "chars": 3976,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ICA/NaturalGradICA.ipynb",
    "chars": 3939,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/GGDILRMA-IP1-MM.ipynb",
    "chars": 5712,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/GGDILRMA-IP2-MM.ipynb",
    "chars": 5461,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/GGDILRMA-ISS1-MM.ipynb",
    "chars": 5552,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/GGDILRMA-ISS2-MM.ipynb",
    "chars": 5464,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/GaussILRMA-IP1-ME.ipynb",
    "chars": 5557,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/GaussILRMA-IP1-MM.ipynb",
    "chars": 5557,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/GaussILRMA-IP2-ME.ipynb",
    "chars": 5473,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/GaussILRMA-IP2-MM.ipynb",
    "chars": 5473,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/GaussILRMA-IPA-ME.ipynb",
    "chars": 5473,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/GaussILRMA-IPA-MM.ipynb",
    "chars": 5473,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/GaussILRMA-ISS1-ME.ipynb",
    "chars": 5563,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/GaussILRMA-ISS1-MM.ipynb",
    "chars": 5563,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/GaussILRMA-ISS2-ME.ipynb",
    "chars": 5475,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/GaussILRMA-ISS2-MM.ipynb",
    "chars": 5475,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/TILRMA-IP1-ME.ipynb",
    "chars": 5569,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/TILRMA-IP1-MM.ipynb",
    "chars": 5569,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/TILRMA-IP2-ME.ipynb",
    "chars": 5485,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/TILRMA-IP2-MM.ipynb",
    "chars": 5485,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/TILRMA-ISS1-ME.ipynb",
    "chars": 5575,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/TILRMA-ISS1-MM.ipynb",
    "chars": 5575,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/TILRMA-ISS2-ME.ipynb",
    "chars": 5487,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/ILRMA/TILRMA-ISS2-MM.ipynb",
    "chars": 5487,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IPSDTA/GaussIPSDTA-VCD.ipynb",
    "chars": 4242,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IPSDTA/TIPSDTA-VCD.ipynb",
    "chars": 4240,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/AuxGaussIVA-IP1.ipynb",
    "chars": 3045,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/AuxGaussIVA-IP2.ipynb",
    "chars": 3000,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/AuxGaussIVA-IPA.ipynb",
    "chars": 3028,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/AuxGaussIVA-ISS1.ipynb",
    "chars": 3048,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/AuxGaussIVA-ISS2.ipynb",
    "chars": 3005,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/AuxIVA-IP1.ipynb",
    "chars": 3334,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/AuxIVA-IP2.ipynb",
    "chars": 3293,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/AuxIVA-IPA.ipynb",
    "chars": 3318,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/AuxIVA-ISS1.ipynb",
    "chars": 3337,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/AuxIVA-ISS2.ipynb",
    "chars": 3294,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/AuxLaplaceIVA-IP1.ipynb",
    "chars": 3045,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/AuxLaplaceIVA-IP2.ipynb",
    "chars": 3004,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/AuxLaplaceIVA-IPA.ipynb",
    "chars": 3028,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/AuxLaplaceIVA-ISS1.ipynb",
    "chars": 3048,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/AuxLaplaceIVA-ISS2.ipynb",
    "chars": 3005,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/FastIVA.ipynb",
    "chars": 3368,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/FasterIVA.ipynb",
    "chars": 3264,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/GradGaussIVA.ipynb",
    "chars": 4854,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/GradIVA.ipynb",
    "chars": 5272,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/GradLaplaceIVA.ipynb",
    "chars": 4860,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/NaturalGradGaussIVA.ipynb",
    "chars": 4875,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/NaturalGradIVA.ipynb",
    "chars": 5114,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/IVA/NaturalGradLaplaceIVA.ipynb",
    "chars": 4703,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/MNMF/FastGaussMNMF-IP1.ipynb",
    "chars": 3974,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/MNMF/FastGaussMNMF-IP2.ipynb",
    "chars": 3931,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/MNMF/GaussMNMF.ipynb",
    "chars": 5365,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/PDSBSS/PDSBSS.ipynb",
    "chars": 4509,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/BSS/PDSBSS/PDSBSS_masking.ipynb",
    "chars": 4180,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[],\"authorship_tag\":\"ABX9TyM/ed6diEsnD5EoCV6u0+FD\"},\""
  },
  {
    "path": "notebooks/BSS/PDSBSS/PDSBSS_multi-penalty.ipynb",
    "chars": 5958,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[]},\"kernelspec\":{\"name\":\"python3\",\"display_name\":\"Py"
  },
  {
    "path": "notebooks/Examples/Getting-Started.ipynb",
    "chars": 5469,
    "preview": "{\"nbformat\":4,\"nbformat_minor\":0,\"metadata\":{\"colab\":{\"provenance\":[],\"authorship_tag\":\"ABX9TyO78AF8O5/QHlr4M5G1igtQ\"},\""
  },
  {
    "path": "pyproject.toml",
    "chars": 1457,
    "preview": "[build-system]\n# ref: https://github.com/pypa/setuptools_scm\nrequires = [\n    \"setuptools>=45\",\n    \"setuptools_scm[toml"
  },
  {
    "path": "ssspy/__init__.py",
    "chars": 325,
    "preview": "try:\n    from .io import wavread, wavwrite\nexcept ModuleNotFoundError:\n    # to avoid module not found error during inst"
  },
  {
    "path": "ssspy/algorithm/__init__.py",
    "chars": 440,
    "preview": "from . import permutation_alignment\nfrom .minimal_distortion_principle import minimal_distortion_principle\nfrom .project"
  },
  {
    "path": "ssspy/algorithm/minimal_distortion_principle.py",
    "chars": 1341,
    "preview": "from typing import Optional\n\nimport numpy as np\n\n\ndef minimal_distortion_principle(\n    estimated: np.ndarray,\n    refer"
  },
  {
    "path": "ssspy/algorithm/permutation_alignment.py",
    "chars": 9882,
    "preview": "import functools\nimport itertools\nfrom typing import Callable, Optional\n\nimport numpy as np\n\nfrom ..special.flooring imp"
  },
  {
    "path": "ssspy/algorithm/projection_back.py",
    "chars": 4972,
    "preview": "from typing import Optional\n\nimport numpy as np\n\n\ndef projection_back(\n    data_or_filter: np.ndarray,\n    reference: Op"
  },
  {
    "path": "ssspy/bss/__init__.py",
    "chars": 95,
    "preview": "from . import fdica, ica, ilrma, iva, mnmf\n\n__all__ = [\"ica\", \"fdica\", \"iva\", \"ilrma\", \"mnmf\"]\n"
  },
  {
    "path": "ssspy/bss/_flooring.py",
    "chars": 641,
    "preview": "import warnings\n\nimport numpy as np\n\nEPS = 1e-10\n\n\ndef identity(input: np.ndarray) -> np.ndarray:\n    r\"\"\"Identity funct"
  },
  {
    "path": "ssspy/bss/_psd.py",
    "chars": 1267,
    "preview": "import functools\nimport warnings\nfrom typing import Callable, Optional\n\nimport numpy as np\n\nfrom ..special.flooring impo"
  },
  {
    "path": "ssspy/bss/_select_pair.py",
    "chars": 2108,
    "preview": "import warnings\nfrom typing import Iterable, Optional, Tuple\n\nfrom ..utils.select_pair import combination_pair_selector "
  },
  {
    "path": "ssspy/bss/_solve_permutation.py",
    "chars": 866,
    "preview": "import functools\nimport warnings\nfrom typing import Callable, Optional\n\nimport numpy as np\n\nfrom ..algorithm.permutation"
  },
  {
    "path": "ssspy/bss/_update_spatial_model.py",
    "chars": 21239,
    "preview": "import functools\nfrom typing import Callable, Iterable, Optional, Tuple\n\nimport numpy as np\n\nfrom ..linalg._solve import"
  },
  {
    "path": "ssspy/bss/admmbss.py",
    "chars": 15996,
    "preview": "import warnings\nfrom typing import Callable, List, Optional, Union\n\nimport numpy as np\n\nfrom ..linalg import prox\nfrom ."
  },
  {
    "path": "ssspy/bss/base.py",
    "chars": 2616,
    "preview": "from typing import Callable, List, Optional, Union\n\nimport numpy as np\n\n__all__ = [\n    \"IterativeMethodBase\",\n]\n\n\nclass"
  },
  {
    "path": "ssspy/bss/cacgmm.py",
    "chars": 25960,
    "preview": "import functools\nfrom typing import Callable, List, Optional, Union\n\nimport numpy as np\n\nfrom ..algorithm.permutation_al"
  },
  {
    "path": "ssspy/bss/fdica.py",
    "chars": 64528,
    "preview": "import functools\nfrom typing import Callable, Iterable, List, Optional, Tuple, Union\n\nimport numpy as np\n\nfrom ..algorit"
  },
  {
    "path": "ssspy/bss/hva.py",
    "chars": 10085,
    "preview": "import functools\nimport math\nfrom typing import Callable, List, Optional, Union\n\nimport numpy as np\n\nfrom ..special.floo"
  },
  {
    "path": "ssspy/bss/ica.py",
    "chars": 37424,
    "preview": "from typing import Callable, List, Optional, Union\n\nimport numpy as np\n\nfrom ..transform import whiten\nfrom .base import"
  },
  {
    "path": "ssspy/bss/ilrma.py",
    "chars": 163306,
    "preview": "import functools\nimport warnings\nfrom typing import Callable, Iterable, List, Optional, Tuple, Union\n\nimport numpy as np"
  },
  {
    "path": "ssspy/bss/ipsdta.py",
    "chars": 69702,
    "preview": "import functools\nfrom typing import Callable, List, Optional, Tuple, Union\n\nimport numpy as np\n\nfrom ..algorithm import "
  },
  {
    "path": "ssspy/bss/iva.py",
    "chars": 134328,
    "preview": "import functools\nfrom typing import Callable, Iterable, List, Optional, Tuple, Union\n\nimport numpy as np\n\nfrom ..algorit"
  },
  {
    "path": "ssspy/bss/mnmf.py",
    "chars": 59564,
    "preview": "import functools\nfrom typing import Callable, Iterable, List, Optional, Tuple, Union\n\nimport numpy as np\n\nfrom ..linalg."
  },
  {
    "path": "ssspy/bss/pdsbss.py",
    "chars": 14254,
    "preview": "import warnings\nfrom typing import Callable, List, Optional, Union\n\nimport numpy as np\n\nfrom ..linalg import prox\nfrom ."
  },
  {
    "path": "ssspy/bss/proxbss.py",
    "chars": 9199,
    "preview": "from typing import Callable, List, Optional, Union\n\nimport numpy as np\n\nfrom ..algorithm import (\n    MINIMAL_DISTORTION"
  },
  {
    "path": "ssspy/io/__init__.py",
    "chars": 6242,
    "preview": "import struct\nfrom io import BufferedReader, BufferedWriter\nfrom typing import Optional, Tuple\n\nimport numpy as np\n\n\ndef"
  },
  {
    "path": "ssspy/linalg/__init__.py",
    "chars": 433,
    "preview": "from ._solve import solve\nfrom .cubic import cbrt\nfrom .eigh import eigh, eigh2\nfrom .inv import inv2\nfrom .lqpqm import"
  },
  {
    "path": "ssspy/linalg/_solve.py",
    "chars": 441,
    "preview": "import numpy as np\nfrom packaging import version\n\nnp_version = np.__version__\n\nIS_NUMPY_GE_2 = version.parse(np.__versio"
  },
  {
    "path": "ssspy/linalg/cubic.py",
    "chars": 460,
    "preview": "import numpy as np\n\n\ndef cbrt(x: np.ndarray) -> np.ndarray:\n    \"\"\"Return cube-root of an array.\n\n    Args:\n        x (n"
  },
  {
    "path": "ssspy/linalg/eigh.py",
    "chars": 7284,
    "preview": "from typing import Callable, Optional, Tuple, Union\n\nimport numpy as np\n\nfrom .inv import inv2\n\n\ndef eigh(\n    A: np.nda"
  },
  {
    "path": "ssspy/linalg/inv.py",
    "chars": 1398,
    "preview": "import numpy as np\n\n\ndef inv2(X: np.ndarray) -> np.ndarray:\n    r\"\"\"Compute the (multiplicative) inverse of a 2x2 matrix"
  },
  {
    "path": "ssspy/linalg/lqpqm.py",
    "chars": 11669,
    "preview": "import functools\nimport warnings\nfrom typing import Callable, Optional, Union\n\nimport numpy as np\n\nfrom ..special.floori"
  },
  {
    "path": "ssspy/linalg/mean.py",
    "chars": 3282,
    "preview": "import numpy as np\n\nfrom .eigh import eigh\n\n\ndef gmeanmh(A: np.ndarray, B: np.ndarray, type: int = 1) -> np.ndarray:\n   "
  },
  {
    "path": "ssspy/linalg/polynomial.py",
    "chars": 2392,
    "preview": "from typing import Optional\n\nimport numpy as np\nfrom numpy.linalg import LinAlgError\n\nfrom .cubic import cbrt\n\n\ndef solv"
  },
  {
    "path": "ssspy/linalg/prox.py",
    "chars": 2369,
    "preview": "import numpy as np\n\n__all__ = [\"l21\", \"neg_log\", \"neg_logdet\"]\n\n\ndef l1(x, step_size: float = 1) -> np.ndarray:\n    norm"
  },
  {
    "path": "ssspy/linalg/quadratic.py",
    "chars": 592,
    "preview": "import numpy as np\n\n\ndef quadratic(X: np.ndarray, A: np.ndarray) -> np.ndarray:\n    r\"\"\"Compute values of quadratic form"
  },
  {
    "path": "ssspy/linalg/sqrtm.py",
    "chars": 1734,
    "preview": "from typing import Callable, Optional\n\nimport numpy as np\n\nfrom .eigh import eigh\n\n\ndef sqrtmh(X: np.ndarray) -> np.ndar"
  },
  {
    "path": "ssspy/special/__init__.py",
    "chars": 235,
    "preview": "from .flooring import add_flooring, identity, max_flooring\nfrom .logsumexp import logsumexp\nfrom .psd import to_psd\nfrom"
  },
  {
    "path": "ssspy/special/flooring.py",
    "chars": 397,
    "preview": "import numpy as np\n\nEPS = 1e-10\n\n\ndef identity(input: np.ndarray) -> np.ndarray:\n    r\"\"\"Identity function.\"\"\"\n    retur"
  },
  {
    "path": "ssspy/special/logsumexp.py",
    "chars": 1082,
    "preview": "import numpy as np\n\n\ndef logsumexp(X: np.ndarray, axis: int = None, keepdims: bool = False) -> np.ndarray:\n    r\"\"\"Compu"
  },
  {
    "path": "ssspy/special/psd.py",
    "chars": 1911,
    "preview": "import functools\nfrom typing import Callable, Optional\n\nimport numpy as np\n\nfrom ..special.flooring import identity, max"
  },
  {
    "path": "ssspy/special/softmax.py",
    "chars": 963,
    "preview": "import numpy as np\n\n\ndef softmax(X: np.ndarray, axis: int = None) -> np.ndarray:\n    r\"\"\"Compute softmax values.\n\n    Ar"
  },
  {
    "path": "ssspy/transform/__init__.py",
    "chars": 77,
    "preview": "from .pca import pca\nfrom .whiten import whiten\n\n__all__ = [\"pca\", \"whiten\"]\n"
  },
  {
    "path": "ssspy/transform/pca.py",
    "chars": 3330,
    "preview": "import numpy as np\n\n\ndef pca(input: np.ndarray, ascend: bool = True) -> np.ndarray:\n    r\"\"\"Apply principal component an"
  },
  {
    "path": "ssspy/transform/whiten.py",
    "chars": 3800,
    "preview": "import numpy as np\n\n\ndef whiten(input: np.ndarray) -> np.ndarray:\n    r\"\"\"Apply whitening (a.k.a sphering).\n\n    Args:\n "
  },
  {
    "path": "ssspy/utils/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "ssspy/utils/dataset/__init__.py",
    "chars": 3632,
    "preview": "from typing import Tuple\n\nimport numpy as np\n\nfrom .mird import download as download_mird\nfrom .sisec2010 import downloa"
  },
  {
    "path": "ssspy/utils/dataset/mird.py",
    "chars": 2488,
    "preview": "import os\nimport shutil\nimport urllib.request\n\nimport numpy as np\n\nreverb_durations = [0.16, 0.36, 0.61]\n\n\ndef download("
  },
  {
    "path": "ssspy/utils/dataset/sisec2010.py",
    "chars": 1552,
    "preview": "import os\nimport shutil\nimport urllib.request\n\nimport numpy as np\n\nfrom ...io import wavread\n\n\ndef download(root: str = "
  },
  {
    "path": "ssspy/utils/flooring.py",
    "chars": 759,
    "preview": "from typing import Any, Callable, Optional, Union\n\nimport numpy as np\n\nfrom ..special.flooring import identity\n\n\ndef cho"
  },
  {
    "path": "ssspy/utils/select_pair.py",
    "chars": 1936,
    "preview": "import itertools\nfrom typing import Iterable, Optional, Tuple\n\n\ndef sequential_pair_selector(\n    n_sources: int, stop: "
  },
  {
    "path": "tests/conftest.py",
    "chars": 575,
    "preview": "# conftest.py is based on\n# https://docs.pytest.org/en/latest/example/simple.html#control-skipping-of-tests-according-to"
  },
  {
    "path": "tests/dummy/callback.py",
    "chars": 157,
    "preview": "def dummy_function(_) -> None:\n    pass\n\n\nclass DummyCallback:\n    def __init__(self) -> None:\n        pass\n\n    def __c"
  },
  {
    "path": "tests/dummy/io.py",
    "chars": 2774,
    "preview": "import os\nimport struct\n\nimport numpy as np\n\n\ndef save_invalid_wavfile(\n    path: str,\n    invalid_riff: bool = False,\n "
  },
  {
    "path": "tests/dummy/utils/dataset/__init__.py",
    "chars": 3692,
    "preview": "import hashlib\nimport json\nimport os\nimport urllib.request\nimport warnings\nfrom typing import List, Optional, Tuple\n\nimp"
  },
  {
    "path": "tests/mock/regression/bss/cacgmm/url.json",
    "chars": 245,
    "preview": "{\n    \"files\": [\n        {\n            \"filename\": \"input.npz\",\n            \"location\": \"npz/canon_8k_reverbed.npz\"\n    "
  },
  {
    "path": "tests/mock/regression/bss/fdica/aux_laplace_fdica/IP1/url.json",
    "chars": 266,
    "preview": "{\n    \"files\": [\n        {\n            \"filename\": \"input.npz\",\n            \"location\": \"npz/canon_8k_reverbed.npz\"\n    "
  },
  {
    "path": "tests/mock/regression/bss/fdica/aux_laplace_fdica/IP2/url.json",
    "chars": 266,
    "preview": "{\n    \"files\": [\n        {\n            \"filename\": \"input.npz\",\n            \"location\": \"npz/canon_8k_reverbed.npz\"\n    "
  },
  {
    "path": "tests/mock/regression/bss/fdica/grad_laplace_fdica/holonomic/url.json",
    "chars": 273,
    "preview": "{\n    \"files\": [\n        {\n            \"filename\": \"input.npz\",\n            \"location\": \"npz/canon_8k_reverbed.npz\"\n    "
  },
  {
    "path": "tests/mock/regression/bss/fdica/grad_laplace_fdica/nonholonomic/url.json",
    "chars": 276,
    "preview": "{\n    \"files\": [\n        {\n            \"filename\": \"input.npz\",\n            \"location\": \"npz/canon_8k_reverbed.npz\"\n    "
  },
  {
    "path": "tests/mock/regression/bss/fdica/natural_grad_laplace_fdica/holonomic/url.json",
    "chars": 281,
    "preview": "{\n    \"files\": [\n        {\n            \"filename\": \"input.npz\",\n            \"location\": \"npz/canon_8k_reverbed.npz\"\n    "
  },
  {
    "path": "tests/mock/regression/bss/fdica/natural_grad_laplace_fdica/nonholonomic/url.json",
    "chars": 284,
    "preview": "{\n    \"files\": [\n        {\n            \"filename\": \"input.npz\",\n            \"location\": \"npz/canon_8k_reverbed.npz\"\n    "
  },
  {
    "path": "tests/mock/regression/bss/ilrma/gauss_ilrma/IP1/ME/url.json",
    "chars": 263,
    "preview": "{\n    \"files\": [\n        {\n            \"filename\": \"input.npz\",\n            \"location\": \"npz/canon_8k_reverbed.npz\"\n    "
  },
  {
    "path": "tests/mock/regression/bss/ilrma/gauss_ilrma/IP1/MM/url.json",
    "chars": 263,
    "preview": "{\n    \"files\": [\n        {\n            \"filename\": \"input.npz\",\n            \"location\": \"npz/canon_8k_reverbed.npz\"\n    "
  },
  {
    "path": "tests/mock/regression/bss/ilrma/gauss_ilrma/IP2/ME/url.json",
    "chars": 263,
    "preview": "{\n    \"files\": [\n        {\n            \"filename\": \"input.npz\",\n            \"location\": \"npz/canon_8k_reverbed.npz\"\n    "
  },
  {
    "path": "tests/mock/regression/bss/ilrma/gauss_ilrma/IP2/MM/url.json",
    "chars": 263,
    "preview": "{\n    \"files\": [\n        {\n            \"filename\": \"input.npz\",\n            \"location\": \"npz/canon_8k_reverbed.npz\"\n    "
  },
  {
    "path": "tests/mock/regression/bss/ilrma/gauss_ilrma/IPA/ME/url.json",
    "chars": 263,
    "preview": "{\n    \"files\": [\n        {\n            \"filename\": \"input.npz\",\n            \"location\": \"npz/canon_8k_reverbed.npz\"\n    "
  },
  {
    "path": "tests/mock/regression/bss/ilrma/gauss_ilrma/IPA/MM/url.json",
    "chars": 263,
    "preview": "{\n    \"files\": [\n        {\n            \"filename\": \"input.npz\",\n            \"location\": \"npz/canon_8k_reverbed.npz\"\n    "
  },
  {
    "path": "tests/mock/regression/bss/ilrma/gauss_ilrma/ISS1/ME/url.json",
    "chars": 264,
    "preview": "{\n    \"files\": [\n        {\n            \"filename\": \"input.npz\",\n            \"location\": \"npz/canon_8k_reverbed.npz\"\n    "
  },
  {
    "path": "tests/mock/regression/bss/ilrma/gauss_ilrma/ISS1/MM/url.json",
    "chars": 264,
    "preview": "{\n    \"files\": [\n        {\n            \"filename\": \"input.npz\",\n            \"location\": \"npz/canon_8k_reverbed.npz\"\n    "
  },
  {
    "path": "tests/mock/regression/bss/ilrma/gauss_ilrma/ISS2/ME/url.json",
    "chars": 264,
    "preview": "{\n    \"files\": [\n        {\n            \"filename\": \"input.npz\",\n            \"location\": \"npz/canon_8k_reverbed.npz\"\n    "
  }
]

// ... and 70 more files (download for full content)

About this extraction

This page contains the full source code of the tky823/ssspy GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 270 files (1.3 MB), approximately 368.2k tokens, and a symbol index with 651 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!