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()
def mode(self, mode): if mode == "normal": statusWindow().maximize() self.info.hide() self.chat.hide() self.map.hide() setTriggerState("^TP", 0) #setTimerState("^TPA", 0) connection().send("set columns %d\n" % statusWindow().getColumns()) elif mode == "all": statusWindow().resizeChars(83, 10) self.map.resizeChars(7, 15) self.chat.resize(statusWindow().getSizeX() -self.map.getSizeX(), self.map.getSizeY()) statusWindow().resize(statusWindow().getSizeX(), XM.mdiHeight()-self.chat.getSizeY()) statusWindow().move(0, 0) self.map.move(0, statusWindow().getSizeY()) self.chat.move(self.map.getSizeX(), statusWindow().getSizeY()) self.info.move(statusWindow().getSizeX(), 0) self.info.resize(XM.mdiWidth()-statusWindow().getSizeX(), XM.mdiHeight()) self.chat.show() self.map.show() self.info.show() setTriggerState("^TPA", 1) #setTimerState("^TPA", 1) connection().send("set columns 9999") connection().send("le2\n")
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()
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()
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()
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()
def strip(self, line, space=1): text = XM.ansiToRaw(line) #statusWindow().write("Type: \"" + str(type(text)) + "\"\n") #statusWindow().write("str(text): \"" + str(text) + "\"\n") #statusWindow().write("text: \"" + text + "\"\n") stripped = line prompt = 0 if re.match(ur'^>', text) != None: prompt = 1 stripped = re.sub(ur'[^>]*> ', '', stripped)
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()