Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, distr_magnitude, factors, init_state_seq=None, p = [[[3, 2, 1], [12, 15, 20], [2, 1, 1]], [[3, 2, 3], [4, 2, 1], [15, 16, 18]]], \
c = [[[0.5, 0.4, 0.1], [0.5, 0.4, 0.1], [0.5, 0.4, 0.1]], [[0.5, 0.4, 0.1], [0.5, 0.4, 0.1], [0.5, 0.4, 0.1]]], n_components=3, covariance_type='diag', startprob=[1,0,0],
transmat=None, startprob_prior=None, transmat_prior=None,
algorithm="viterbi", means_prior=None, means_weight=0,
covars_prior=1e-2, covars_weight=1,
random_state=None, n_iter=10, thresh=1e-2,
params=string.ascii_letters,
init_params=string.ascii_letters):
_BaseHMM.__init__(self, n_components, startprob, transmat,
startprob_prior=startprob_prior,
transmat_prior=transmat_prior, algorithm=algorithm,
random_state=random_state, n_iter=n_iter,
thresh=thresh, params=params,
init_params=init_params)
self.c = c # 1) dim 2) component 3) state
self.p = p # 1) dim 2) component, parameter of Poisson distribution 3) state
self.n_features = 2 #emission dimension
self.init_state_seq = init_state_seq
self.distr_magnitude = distr_magnitude
self.factors = factors #weight of the posteriors
assert len(self.factors) == self.distr_magnitude
self.weights = 0 #weigths for merging distributions
def __init__(self, n, p, dim_cond_1, dim_cond_2, init_state_seq=None, n_components=2, covariance_type='diag', startprob_prior=None, transmat_prior=None,
algorithm="viterbi", means_prior=None, means_weight=0,
covars_prior=1e-2, covars_weight=1,
random_state=None, n_iter=10, thresh=1e-2,
params=string.ascii_letters,
init_params=string.ascii_letters):
_BaseHMM.__init__(self, n_components,
startprob_prior=startprob_prior,
transmat_prior=transmat_prior, algorithm=algorithm,
random_state=random_state, n_iter=n_iter,
tol=thresh, params=params,
init_params=init_params)
self.dim = [dim_cond_1, dim_cond_2] #dimension of one emission
self.n = n
self.p = p
self.n_features = 2 #emission dimension
self.init_state_seq = init_state_seq
self.count_s1, self.count_s2 = 0, 0
self.lookup_logpmf = {}
def __init__(self, n, init_state_seq=None, p = [[[0.1, 0.1, 0.2], [0.8, 0.9, 0.7], [0.3, 0.2, 0.25]], [[0.1, 0.1, 0.12], [0.2, 0.2, 0.3], [0.9, 0.7, 0.8]]], \
c = [[[0.5, 0.4, 0.1], [0.5, 0.4, 0.1], [0.5, 0.4, 0.1]], [[0.5, 0.4, 0.1], [0.5, 0.4, 0.1], [0.5, 0.4, 0.1]]], n_components=3, covariance_type='diag', startprob=None,
transmat=None, startprob_prior=None, transmat_prior=None, distr_magnitude = 3,
algorithm="viterbi", means_prior=None, means_weight=0,
covars_prior=1e-2, covars_weight=1,
random_state=None, n_iter=10, thresh=1e-2,
params=string.ascii_letters,
init_params=string.ascii_letters):
_BaseHMM.__init__(self, n_components, startprob, transmat,
startprob_prior=startprob_prior,
transmat_prior=transmat_prior, algorithm=algorithm,
random_state=random_state, n_iter=n_iter,
thresh=thresh, params=params,
init_params=init_params)
self.c = c
self.n = n
self.p = p # 1) emission-component 2) state 3) component
self.n_features = 2 #emission dimension
self.init_state_seq = init_state_seq
self.count_s1, self.count_s2 = 0, 0
self.distr_magnitude = distr_magnitude
def __init__(self, distr_magnitude, factors, init_state_seq=None, p = [[[3, 2, 1], [12, 15, 20], [2, 1, 1]], [[3, 2, 3], [4, 2, 1], [15, 16, 18]]], \
c = [[[0.5, 0.4, 0.1], [0.5, 0.4, 0.1], [0.5, 0.4, 0.1]], [[0.5, 0.4, 0.1], [0.5, 0.4, 0.1], [0.5, 0.4, 0.1]]], n_components=3, covariance_type='diag', startprob=[1,0,0],
transmat=None, startprob_prior=None, transmat_prior=None,
algorithm="viterbi", means_prior=None, means_weight=0,
covars_prior=1e-2, covars_weight=1,
random_state=None, n_iter=10, thresh=1e-2,
params=string.ascii_letters,
init_params=string.ascii_letters):
_BaseHMM.__init__(self, n_components, startprob, transmat,
startprob_prior=startprob_prior,
transmat_prior=transmat_prior, algorithm=algorithm,
random_state=random_state, n_iter=n_iter,
thresh=thresh, params=params,
init_params=init_params)
self.c = c # 1) dim 2) component 3) state
self.p = p # 1) dim 2) component, parameter of Poisson distribution 3) state
self.n_features = 2 #emission dimension
self.init_state_seq = init_state_seq
self.distr_magnitude = distr_magnitude
self.factors = factors #weight of the posteriors
assert len(self.factors) == self.distr_magnitude
self.weights = 0 #weigths for merging distributions
def __init__(self, alpha, mu, dim_cond_1, dim_cond_2, init_state_seq=None, n_components=3, covariance_type='diag',
startprob_prior=1.0, transmat_prior=1.0, func=None,
algorithm="viterbi", means_prior=None, means_weight=0,
covars_prior=1e-2, covars_weight=1,
random_state=None, n_iter=30, thresh=1e-2,
params=string.ascii_letters,
init_params=string.ascii_letters):
_BaseHMM.__init__(self, n_components,
startprob_prior=startprob_prior,
transmat_prior=transmat_prior, algorithm=algorithm,
random_state=random_state, n_iter=n_iter,
tol=thresh, params=params,
init_params=init_params)
self.dim = [dim_cond_1, dim_cond_2] #dimension of one emission
self.n_features = 2 #sum(self.dim) #emission dimension
self.alpha = alpha
self.mu = mu
self._update_distr(self.mu, self.alpha)
self.func = func
self.em_prob = 0
def __init__(self, n, init_state_seq=None, p = [[0.4, 0.2, 0.3], [0.6, 0.8, 0.7]], n_components=2, covariance_type='diag', startprob=None,
transmat=None, startprob_prior=None, transmat_prior=None,
algorithm="viterbi", means_prior=None, means_weight=0,
covars_prior=1e-2, covars_weight=1,
random_state=None, n_iter=10, thresh=1e-2,
params=string.ascii_letters,
init_params=string.ascii_letters):
_BaseHMM.__init__(self, n_components, startprob, transmat,
startprob_prior=startprob_prior,
transmat_prior=transmat_prior, algorithm=algorithm,
random_state=random_state, n_iter=n_iter,
thresh=thresh, params=params,
init_params=init_params)
self.n = n
self.p = p
self.n_features = 2 #emission dimension
self.init_state_seq = init_state_seq
self.count_s1, self.count_s2 = 0, 0