display.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:data-analysis 作者: ymohanty 项目源码 文件源码
def handlePCA(self, event=None):
        if self.data is None:
            tkMessageBox.showerror("No File Open", "Please open a file first!")
            return
        d = PCADialog(self.root, self.data.get_headers())
        if d.result is None:
            return
        if d.result[2] in self.pca_data.keys():
            tkMessageBox.showwarning("Replacing Saved Analysis",
                                     "Please delete old analysis before creating another with the same name.")
            return
        if d.result[0] == 1:
            self.pca_data[d.result[2]] = analysis.pca(self.data, d.result[1])
            self.pca_data[d.result[2]].write_to_file(d.result[2], self.pca_data[d.result[2]].get_headers())
            print "Normalizing: True"
        else:
            self.pca_data[d.result[2]] = analysis.pca(self.data, d.result[1], False)
            self.pca_data[d.result[2]].write_to_file(d.result[2], self.pca_data[d.result[2]].get_headers())
            print "Normalizing: False"
        if not self.pca_controls_built:
            self.buildPCAControls()

        self.pca_lbox.insert(tk.END, d.result[2])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号