def learnCategories(sequence): sampler = DP.sampleDPMM( [[i] for i in sequence], np.zeros(len(sequence)), 5.0, GaussNIX.GaussianNIXModel, Clusters.modelParameters ) # assignments = sampler.wangSUGS() assignments = sampler.gibbs() return assignments
def learnCategoriesVanilla(sequence): sampler = DP.sampleDPMM([[i] for i in sequence], np.zeros(len(sequence)), 3.0, Gauss.GaussGauss, DP.modelParameters) # assignments = sampler.wangSUGS() assignments = sampler.gibbs() return assignments