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

Support multi-dimensional output for CP regression #252

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

merajhashemi
Copy link
Member

This pr resolves #51 (CP only).

@codecov
Copy link

codecov bot commented Mar 28, 2021

Codecov Report

Merging #252 (2727188) into main (e5dd284) will decrease coverage by 3.37%.
The diff coverage is 100.00%.

❗ Current head 2727188 differs from pull request most recent head 2dcee40. Consider uploading reports for the commit 2dcee40 to get more accurate results

@@            Coverage Diff             @@
##             main     #252      +/-   ##
==========================================
- Coverage   86.86%   83.49%   -3.37%     
==========================================
  Files         120      120              
  Lines        7390     7423      +33     
==========================================
- Hits         6419     6198     -221     
- Misses        971     1225     +254     
Impacted Files Coverage Δ
tensorly/regression/cp_regression.py 100.00% <100.00%> (ø)
tensorly/regression/tests/test_cp_regression.py 100.00% <100.00%> (ø)
tensorly/contrib/decomposition/_tt_cross.py 4.29% <0.00%> (-84.67%) ⬇️
...ecomposition/tests/test_mps_decomposition_cross.py 21.79% <0.00%> (-78.21%) ⬇️
tensorly/contrib/sparse/tests/test_tenalg.py 29.41% <0.00%> (-70.59%) ⬇️
...ensorly/contrib/sparse/tests/test_decomposition.py 41.17% <0.00%> (-58.83%) ⬇️
tensorly/utils/_prod.py 71.42% <0.00%> (-28.58%) ⬇️
tensorly/contrib/sparse/core.py 75.00% <0.00%> (-25.00%) ⬇️
tensorly/contrib/sparse/backend/__init__.py 75.86% <0.00%> (-10.35%) ⬇️
tensorly/backend/__init__.py 79.66% <0.00%> (-10.17%) ⬇️
... and 6 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@merajhashemi
Copy link
Member Author

I will add new test cases for multi-dimensional outputs🙂

Copy link
Contributor

@aarmey aarmey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great @merajhashemi! Could you please run black formatting on the code? black tensorly in the top directory should do it.

for i in range(
1, T.ndim(X)
): # The first dimension of X is the number of samples
W.append(T.tensor(rng.randn(X.shape[i], self.weight_rank), **T.context(X)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check that I resolved the merge conflict correctly here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I definitely think I messed up the merge here.

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

Successfully merging this pull request may close these issues.

Tensor regression with y of arbitrary order
2 participants