Hello! I’m currently writing my own module that uses a 2-component Gaussian mixture model (sklearn.mixture.GaussianMixture) from scikit-learn 0.19.0 to cluster the intensity of objects into background and signal. I’ve managed to make it work in a standalone python script using exported data from another cpproj, but as soon as I place imports into my module.py, I get the following behavior:
If I include import sklearn, no error is thrown until sklearn.mixture.GaussianMixture is called during the module’s run() in Start Test Mode, at which point I get:
AttributeError: ‘module’ object has no attribute ‘mixture’
If I instead include import sklearn.mixture, a different error is thrown at startup:
ImportError: No module named mixture
I’m not sure how to utilize sklearn in my module. Any help would be appreciated. Thanks!
EDIT: The import is successful in the dev build of cellprofiler (3.1.4).