Skip to content

"from soundsig.sound import BioSound" fails because "ImportError: cannot import name 'RandomizedPCA' from 'sklearn.decomposition'" with sklearn 0.20.3 #1

@VincentRouvreau

Description

@VincentRouvreau

On Windows 10 x64, with Python 3.7 (conda or classic installation), import soundsig works but "from soundsig.sound import BioSound" fails.

Here is the complete log :
Python 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.

import numpy as np
import matplotlib.pyplot as plt
from soundsig.sound import BioSound
Traceback (most recent call last):
File "", line 1, in
File "C:\Miniconda3\lib\site-packages\soundsig\sound.py", line 29, in
from soundsig.signal import lowpass_filter, gaussian_window, correlation_function
File "C:\Miniconda3\lib\site-packages\soundsig\signal.py", line 11, in
from sklearn.decomposition import PCA,RandomizedPCA
ImportError: cannot import name 'RandomizedPCA' from 'sklearn.decomposition' (C:\Miniconda3\lib\site-packages\sklearn\decomposition_init_.py)

In Scikit-learn, RandomizedPCA is deprecated since version 0.20.2, cf. https://stackoverflow.com/questions/54494785/sklearn-0-20-2-import-error-with-randomizedpca

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions