示例#1
0
def compute_gmm(finestra, root, status, percorsoD, percorsoS, percorsoG,
                percorsoDN, clusters, iniz, cov):
    status.configure(text="Processing")
    status.update()
    if clusters == "":
        messagebox.showwarning("WARNING", "Specify number of clusters")
        status.configure(text="Ready")
        return
    if iniz == "":
        messagebox.showwarning("WARNING",
                               "Specify number of re-initialization")
        status.configure(text="Ready")
        return
    if cov == "":
        messagebox.showwarning("WARNING", "Select a type of variance")
        status.configure(text="Ready")
        return
    if cov == "D":
        cov = 'diag'
    if cov == "F":
        cov = 'full'
    if cov == "T":
        cov = 'tied'
    if cov == "S":
        cov = 'spherical'
    gm.gmm(clusters, cov, iniz, percorsoD, percorsoS, percorsoG, percorsoDN)
    status.configure(text="Ready")
    messagebox.showinfo("Finish", "The GMM process has ended successfully")
    root.destroy()
    XM.build_up()
示例#2
0
def compute_tsne(finestra, root, status, percorsoD, percorsoS, samples):
    status.configure(text="Processing")
    status.update()
    if samples == "":
        messagebox.showwarning("WARNING", "Specify number of samples")
        status.configure(text="Ready")
        return
    sc.tsne(percorsoD, percorsoS, samples)
    status.configure(text="Ready")
    messagebox.showinfo("Finish", "The t-SNE process has ended successfully")
    root.destroy()
    XM.build_up()
示例#3
0
def compute_kmeans(finestra, root, status, percorsoD, percorsoS, percorsoG,
                   percorsoDN, clusters):
    status.configure(text="Processing")
    status.update()
    if clusters == "":
        messagebox.showwarning("WARNING", "Specify number of clusters")
        status.configure(text="Ready")
        return
    km.kmeans(clusters, percorsoD, percorsoS, percorsoG, percorsoDN)
    status.configure(text="Ready")
    messagebox.showinfo("Finish", "The KMEANS process has ended successfully")
    root.destroy()
    XM.build_up()
示例#4
0
def compute_ticc(finestra, root, status, percorsoD, percorsoS, percorsoG,
                 percorsoDN, clusters, window, p_lambda, beta):
    status.configure(text="Processing")
    status.update()
    if clusters == "":
        messagebox.showwarning("WARNING", "Specify number of clusters")
        status.configure(text="Ready")
        return
    ticc.genera_cluster(clusters, window, p_lambda, beta, percorsoD, percorsoS,
                        percorsoG, percorsoDN)
    status.configure(text="Ready")
    messagebox.showinfo("Finish", "The TICC process has ended successfully")
    root.destroy()
    XM.build_up()
示例#5
0
def comp_Default(finestra, root, status, entry, percorsoD, percorsoS,
                 percorsoG, percorsoDN):
    status.configure(text="Processing")
    status.update()
    print(percorsoS)
    if entry == "":
        messagebox.showwarning("WARNING", "Specify number of clusters")
        status.configure(text="Ready")
        return
    sc.genera_cluster(entry, 0, 0, 0, percorsoD, percorsoS, percorsoG,
                      percorsoDN)
    status.configure(text="Ready")
    messagebox.showinfo("Finish",
                        "The clustering process has ended successfully")
    root.destroy()
    XM.build_up()
示例#6
0
def comp_Custom(finestra, root, status, entry1, entry2, entry3, percorsoD,
                percorsoS, percorsoG, percorsoDN):
    status.configure(text="Processing")
    status.update()
    if entry1 == "":
        messagebox.showwarning("WARNING", "Specify SDMax")
        status.configure(text="Ready")
        return
    if entry2 == "":
        messagebox.showwarning("WARNING", "Specify N")
        status.configure(text="Ready")
        return
    if entry3 == "":
        messagebox.showwarning("WARNING", "Specify NbIter")
        status.configure(text="Ready")
        return
    sc.genera_cluster("-", entry1, entry2, entry3, percorsoD, percorsoS,
                      percorsoG, percorsoDN)
    status.configure(text="Ready")
    messagebox.showinfo("Finish",
                        "The clustering process has ended successfully")
    root.destroy()
    XM.build_up()