예제 #1
0
def plot_true_clusters():
    for k in range(K):
        c = k % len(GaussViz.Colors)
        GaussViz.plotGauss2DContour(
            mus[k],
            sigmas[k],
            color=GaussViz.Colors[c])
예제 #2
0
def _viz_Gauss_before_after(
        curModel=None, propModel=None,
        curSS=None, propSS=None,
        Plan=None,
        propLscore=None, curLscore=None,
        Data_b=None, Data_t=None, 
        **kwargs):
    pylab.subplots(
        nrows=1, ncols=2, figsize=(8, 4), num=1)
    h1 = pylab.subplot(1, 2, 1)
    h1.clear()
    GaussViz.plotGauss2DFromHModel(
        curModel, compsToHighlight=Plan['btargetCompID'], figH=h1)
    if curLscore is not None:
        pylab.title('%.4f' % (curLscore))

    h2 = pylab.subplot(1, 2, 2, sharex=h1, sharey=h1)
    h2.clear()
    newCompIDs = np.arange(curModel.obsModel.K, propModel.obsModel.K)
    GaussViz.plotGauss2DFromHModel(
        propModel, compsToHighlight=newCompIDs, figH=h2, Data=Data_t)
    if propLscore is not None:
        pylab.title('%.4f' % (propLscore))
    
        Lgain = propLscore - curLscore
        if Lgain > 0:
            pylab.xlabel('ACCEPT +%.2f' % (Lgain))
        else:
            pylab.xlabel('REJECT %.2f' % (Lgain))
    pylab.draw()
    pylab.subplots_adjust(hspace=0.1, top=0.9, bottom=0.15,
                          left=0.15, right=0.95)
예제 #3
0
def plot_true_clusters():
    from bnpy.viz import GaussViz
    for k in range(K):
        c = k % len(GaussViz.Colors)
        GaussViz.plotGauss2DContour(Mu[k], Sigma[k], color=GaussViz.Colors[c])
예제 #4
0
def plot_true_clusters():
  from bnpy.viz import GaussViz
  for k in range(K):
    c = k % len(GaussViz.Colors)
    GaussViz.plotGauss2DContour( Mu[k], Sigma[k], color=GaussViz.Colors[c] )