def make_plot(*data_files):
    table = []
    for f in data_files:
        t = np.loadtxt(f, delimiter=',')
        t[:, 0] = np.array([int(D) for D in t[:, 0]])
        table.append(t)
    table = np.concatenate(table)

    ## customize plot below ##
    p = plot.ErrorBar()
    p.xlabel = 'number of dimensions'
    p.legends = [
        r'$\mathcal{E}^{H}$', r'$\mathcal{E}^{L}$', r'$\mathcal{E}^{S}$',
        r'$k$-means', r'GMM'
    ]
    p.colors = ['b', 'r', 'g', 'm', 'c']
    p.symbols = ['o', 's', 'D', '^', 'v']
    p.lines = ['-', '-', '-', '-', '-']
    #p.output = './experiments_figs/normal_highdim_mean.pdf'
    p.output = './experiments_figs/normal_highdim_cov.pdf'
    #p.bayes = 0.86
    p.bayes = 0.9537075
    #p.xlim = [10, 200]
    p.xlim = [10, 700]
    p.make_plot(table)
Exemple #2
0
def make_plot_difference(*data_files):
    table = []
    for f in data_files:
        t = np.loadtxt(f, delimiter=',')
        t[:,0] = np.array([int(D) for D in t[:,0]])
        table.append(t)
    table = np.concatenate(table)

    ## customize plot below ##
    p = plot.ErrorBar()
    p.xlabel = 'number of points'
    p.ylabel = 'difference in accuracy'
    p.legends = [
        r'$\mathcal{E}^{H} - \mathcal{E}^{L}$', 
        r'$\mathcal{E}^{H} - \mathcal{E}^{S}$', 
    ]
    p.colors = ['b', 'r']
    p.symbols = ['o', 's']
    #p.output = './experiments_figs/normal_kernels_difference.pdf'
    p.output = './experiments_figs/lognormal_kernels_difference.pdf'
    p.doublex = True
    p.legcols = 1
    #p.bayes = 0.0
    p.xlim = [10, 400]
    p.make_plot(table)
Exemple #3
0
def make_plot(*data_files):
    table = []
    for f in data_files:
        t = np.loadtxt(f, delimiter=',')
        t[:,0] = np.array([int(D) for D in t[:,0]])
        table.append(t)
    table = np.concatenate(table)

    ## customize plot below ##
    p = plot.ErrorBar()
    p.xlabel = 'number of points'
    p.legends = [r'$\mathcal{E}^{H}$, $\rho$', 
                 r'$\mathcal{E}^{H}$, $\rho_{1/2}$', 
                 r'$\mathcal{E}^{H}$, $\rho_{e}$', 
                 r'$k$-means', 
                 r'GMM']
    p.colors = ['b', 'r', 'g', 'm', 'c']
    p.symbols = ['o', 's', 'D', '^', 'v']
    p.lines = ['-', '-', '-', '-', '-']
    p.output = './experiments_figs/normal_kernels.pdf'
    #p.output = './experiments_figs/lognormal_kernels.pdf'
    p.doublex = True
    p.bayes = 0.9
    p.xlim = [10, 400]
    p.make_plot(table)
Exemple #4
0
def make_plot(*data_files):
    table = []
    for f in data_files:
        t = np.loadtxt(f, delimiter=',')
        t[:, 0] = np.array([int(D) for D in t[:, 0]])
        table.append(t)
    table = np.concatenate(table)

    ## customize plot below ##
    p = plot.ErrorBar()
    p.xlabel = r'$n$'
    p.ylabel = r'accuracy'
    p.legends = [r'$\mathcal{E}^{H}$-clustering', r'$k$-means', 'GMM']
    p.colors = ['b', 'r', 'g']
    p.lines = ['-', '-', '-']
    #p.output = './experiments_figs2/1D_normal.pdf'
    p.output = './experiments_figs2/1D_lognormal.pdf'
    p.bayes = 0.88
    #p.bayes = 0.852
    p.xlim = [10, 800]
    #p.ylim = [0.75,0.89]
    p.ylim = [0.5, 0.89]
    #p.loc = [0.45,0.5]
    p.loc = [0.45, 0.3]
    p.make_plot(table)
Exemple #5
0
def make_plot_difference(*data_files):
    table = []
    for f in data_files:
        t = np.loadtxt(f, delimiter=',')
        t[:, 0] = np.array([int(D) for D in t[:, 0]])
        table.append(t)
    table = np.concatenate(table)

    ## customize plot below ##
    p = plot.ErrorBar()
    p.xlabel = r'$\#$ points'
    p.ylabel = 'difference in accuracy'
    p.legends = [
        #r'$\mathcal{E}^{H} - \textnormal{kernel $k$-means}$',
        #r'$\mathcal{E}^{H} - \textnormal{spectral-clustering}$',
        r'$\mathcal{E}^{H}\mbox{-clustering} - \mbox{kernel $k$-means}$',
        r'$\mathcal{E}^{H}\mbox{-clustering} - \mbox{spectral clustering}$',
    ]
    p.colors = ['b', 'r']
    p.symbols = ['o', 's']
    p.output = './experiments_figs2/normal_kernels_difference.pdf'
    #p.output = './experiments_figs2/lognormal_kernels_difference.pdf'
    #p.doublex = True
    p.legcols = 1
    #p.bayes = 0.0
    p.xlim = [10, 400]
    #p.loc = 1
    p.loc = 3
    p.make_plot(table)
Exemple #6
0
def make_plot(*data_files):
    table = []
    for f in data_files:
        t = np.loadtxt(f, delimiter=',')
        t[:, 0] = np.array([int(D) for D in t[:, 0]])
        table.append(t)
    table = np.concatenate(table)

    ## customize plot below ##
    p = plot.ErrorBar()
    p.xlabel = r'$\#$ points'
    p.ylabel = 'accuracy'
    p.legends = [
        r'$\mathcal{E}^{H}$-clustering, $\rho_1$',
        r'$\mathcal{E}^{H}$-clustering, $\rho_{1/2}$',
        r'$\mathcal{E}^{H}$-clustering, $\widetilde{\rho}_{1}$', r'$k$-means',
        r'GMM'
    ]
    p.colors = ['b', 'r', 'g', 'm', 'c']
    p.symbols = ['o', 's', 'D', '^', 'v']
    p.lines = ['-', '-', '-', '-', '-']
    #p.output = './experiments_figs2/normal_kernels.pdf'
    p.output = './experiments_figs2/lognormal_kernels.pdf'
    #p.doublex = True
    p.bayes = 0.9
    p.xlim = [10, 400]
    #p.ylim = [0.6, 0.91]
    p.ylim = [0.55, 0.91]
    p.loc = 0
    p.make_plot(table)
def make_plot(*data_files):
    table = []
    for f in data_files:
        t = np.loadtxt(f, delimiter=',')
        t[:, 0] = np.array([int(D) for D in t[:, 0]])
        table.append(t)
    table = np.concatenate(table)

    ## customize plot below ##
    p = plot.ErrorBar()
    p.xlabel = r'$\#$ dimensions'
    p.ylabel = r'accuracy'
    p.legends = [
        r'$\mathcal{E}^{H}$-clustering',
        r'kernel $k$-means',
        #r'$\mathcal{E}^L$',
        r'spectral clustering',
        r'$k$-means',
        r'GMM'
    ]
    p.loc = 3
    p.colors = ['b', 'r', 'g', 'm', 'c']
    p.symbols = ['o', 's', 'D', '^', 'v']
    p.lines = ['-', '-', '-', '-', '-']
    p.output = './experiments_figs2/normal_highdim_mean.pdf'
    #p.output = './experiments_figs2/normal_highdim_cov.pdf'
    p.bayes = 0.86
    #p.bayes = 0.9537075
    p.xlim = [10, 200]
    #p.xlim = [10, 700]
    p.ylim = [0.55, 0.87]
    #p.ylim = [0.55, 0.965]
    p.make_plot(table)
Exemple #8
0
def make_plot(*data_files):
    table = []
    for f in data_files:
        t = np.loadtxt(f, delimiter=',')
        t[:,0] = np.array([int(D) for D in t[:,0]])
        table.append(t)
    table = np.concatenate(table)

    ## customize plot below ##
    p = plot.ErrorBar()
    p.xlabel = 'number of unbalanced points'
    p.legends = [r'$\mathcal{E}^{H}$', 
                 r'$\mathcal{E}^{L}$', 
                 r'$\mathcal{E}^{S}$', 
                 r'$k$-means', 
                 r'GMM']
    p.colors = ['b', 'r', 'g', 'm', 'c']
    p.symbols = ['o', 's', 'D', '^', 'v']
    p.xlim = [0,240]
    p.output = './experiments_figs/normal_unbalanced.pdf'
    p.make_plot(table)