jmschrei / pomegranate

Fast, flexible and easy to use probabilistic modelling in Python.
http://pomegranate.readthedocs.org/en/latest/
MIT License
3.29k stars 590 forks source link

Unresolved reference in Pycharm #1066

Open pipobingo opened 8 months ago

pipobingo commented 8 months ago

I have installed the package Pomegranate on my project. I use Pycharm. I then import at the beginning of my file with the command :

import pomegranate, time, seaborn, numpy from pomegranate import * states = [MultivariateGaussianDistribution(means[i], numpy.eye(means.shape[1])) for i in range(transmat.shape[0])] model = HiddenMarkovModel.from_matrix(transmat, states, start_probs, merge='None')

Unfortunatly, Pycharm does not recognise the references MultivariateGaussianDistribution and HiddenMarkovModel. It states : Unresolved reference 'HiddenMarkovModel'. I have reinstalled the package many times but that doesn't change anything.

Can someone help ?

jmschrei commented 8 months ago

MultivariateGaussianDistribution and HiddenMarkovModel are objects in pomegranate before the recent rewrite. Please see the README for reasoning. What you're looking for is Normal (https://github.com/jmschrei/pomegranate/blob/master/pomegranate/distributions/normal.py#L22) and either SparseHMM or DenseHMM (probably DenseHMM).

pipobingo commented 8 months ago

Thank you very much for your help. Things have sundenly become clearer.