xinychen/transdim

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

Opened this issue · 2 comments

你好,我有三条存在关联的时间序列数据,缺失值设置为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

十分感谢你的开源项目!

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

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

感谢您的回复!