大小(x,1)必须大于n_components,n_components必须大于1
我得到了一个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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您具有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.