大小(x,1)必须大于n_components,n_components必须大于1

发布于 2025-02-12 21:17:01 字数 223 浏览 2 评论 0原文

我得到了一个2*86矩阵。我想在朱莉娅的这个矩阵上应用UMAP。因此,我的代码是

embedding = umap(matrix; n_neighbors=2, min_dist=0.1, n_epochs=200)

当我收到错误“ grigentError:size(x,1)必须大于n_components,并且N_COMPONENTS必须大于1“如何解决此错误?

I got a 2*86 matrix. And I want to apply umap on this matrix in Julia. So my code is

embedding = umap(matrix; n_neighbors=2, min_dist=0.1, n_epochs=200)

While I got the error "ArgumentError: size(X, 1) must be greater than n_components and n_components must be greater than 1" How to solve this error?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不即不离 2025-02-19 21:17:01

如果您具有N×M矩阵,则将其解释为对N维数据的观察,即输入中的每一列都是输入空间中的向量。由于UMAP降低了数据的维度,因此输入中的行必须大于请求数量的输出组件,n_components,默认为2 and can and can and can' t(此刻)在UMAP.JL中为1

您对二维数据有86个观察结果。由于数据已经是二维,因此您不能使用umap来降低维度。

If you have an n×m matrix, UMAP.jl interprets it as m observations of n-dimensional data, i.e. every column in your input is a vector in your input space. Since umap reduces the dimensionality of your data the number of rows in your input needs to be larger than than the requested number of output components, n_components which defaults to 2 and can't (at this moment) be 1 in UMAP.jl.

You have 86 observations of 2-dimensional data. Since the data is already 2-dimensional you can't use umap to reduce the dimensionality.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文