我试图使用skitlearn软件包进行PCA。在这里给出的文档网站中 http://scikit-learn.org/stable/modules/generated/sklearn.decomposition.PCA.html
据说,如果n_components=='mle',那么mle用于查找主成分的数量,但是当我运行我的代码时
X_reduced = PCA(n_components=mle).fit_transform(self.X)
它会给出一条错误消息
未定义全局名称“mle”
如何指定必须使用mle方法。在
引用mle,就像文档中提到的那样。在
问题是当你说mle而不是mle时,它指的是变量,在你的例子中没有定义。在
相关问题 更多 >
编程相关推荐