Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

应用在自己的数据集上出现问题 #9

Open
linyu21 opened this issue Jul 21, 2021 · 2 comments
Open

应用在自己的数据集上出现问题 #9

linyu21 opened this issue Jul 21, 2021 · 2 comments

Comments

@linyu21
Copy link

linyu21 commented Jul 21, 2021

你好,我有三条存在关联的时间序列数据,缺失值设置为0,我将他们重组成(6720,3)形状,采用LRTC进行数据填补,在运行过程中出现了问题。
ValueError Traceback (most recent call last)
in
11 epsilon = 1e-4
12 maxiter = 200
---> 13 tensor_hat = LRTC(dense_tensor, sparse_tensor, alpha, rho, theta, epsilon, maxiter)
14 end = time.time()
15 print('Running time: %d seconds'%(end - start))

in LRTC(failed resolving arguments)
55 Z[pos_missing] = np.mean(X + T / rho, axis = 0)[pos_missing]
56 T = T + rho * (X - np.broadcast_to(Z, np.insert(dim, 0, len(dim))))
---> 57 tensor_hat = np.einsum('k, kmnt -> mnt', alpha, X)
58 tol = np.sqrt(np.sum((tensor_hat - last_tensor) ** 2)) / snorm
59 last_tensor = tensor_hat.copy()

<array_function internals> in einsum(*args, **kwargs)

~\AppData\Roaming\Python\Python36\site-packages\numpy\core\einsumfunc.py in einsum(out, optimize, *operands, **kwargs)
1348 if specified_out:
1349 kwargs['out'] = out
-> 1350 return c_einsum(*operands, **kwargs)
1351
1352 # Check the kwargs to avoid a more cryptic error later, without having to

ValueError: einstein sum subscripts string contains too many subscripts for operand 1

十分感谢你的开源项目!

@xinychen
Copy link
Owner

您好!很高兴收到您的反馈!LRTC全称是low-rank tensor completion,主要用于third-order tensor的imputation问题,在这里,tensor的size默认为M x N x K,你这里的数据集是矩阵,所以没办法进行测试,如果可以,不妨尝试一下本开源项目中提供的矩阵模型进行测试。

@xinychen xinychen reopened this Jul 24, 2021
@linyu21
Copy link
Author

linyu21 commented Jul 24, 2021

您好!很高兴收到您的反馈!LRTC全称是low-rank tensor completion,主要用于third-order tensor的imputation问题,在这里,tensor的size默认为M x N x K,你这里的数据集是矩阵,所以没办法进行测试,如果可以,不妨尝试一下本开源项目中提供的矩阵模型进行测试。

感谢您的回复!

@linyu21 linyu21 closed this as completed Jul 24, 2021
@xinychen xinychen reopened this Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants