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

Tensor regression with y of arbitrary order #51

Open
outlace opened this issue May 11, 2018 · 5 comments · May be fixed by #252
Open

Tensor regression with y of arbitrary order #51

outlace opened this issue May 11, 2018 · 5 comments · May be fixed by #252
Labels
new feature Adding a new feature/method/algorithm

Comments

@outlace
Copy link

outlace commented May 11, 2018

Right now using something like

estimator = TuckerRegressor(weight_ranks=[5], tol=10e-7, n_iter_max=100, reg_W=1, verbose=0)
estimator.fit(X,y)

demands that X be of dimensions (num_samples, num_features) and y be of dimension (num_samples). Why can't X and y be arbitrary tensor dimensions? For example, if I want to find a weight tensor that will minimize the error between an image (num_images, width, height, channels) and its rotated version (num_images, width, height, channels), it doesn't appear I can do that with the tensor regression API. Or if I want to learn a tensor that will contract with a vector to produce some simple 2d image (i.e. a matrix).

@JeanKossaifi
Copy link
Member

X can be a tensor of any order, while y is the vector of output labels. Note that you must have len(weight_ranks) = ndim(X) (i.e. the rank of the core tensor).
You can refer to the user_guide, the documentation and the example.

You can also find the details on the method in the paper "Tensor Learning for Regression", by W. Guo, I. Kotsia, and I. Patras, in IEEE Transactions on Image Processing, 2012.

I am also working on a more general model to have y be of any order but this isn't in TensorLy yet.

@outlace
Copy link
Author

outlace commented May 11, 2018

@JeanKossaifi Thanks for the clarification. I will keep a look out for the update that will allow y to be any order.

@outlace outlace changed the title Tensor regression with arbitrary "label" dimensions Tensor regression with y of arbitrary order May 11, 2018
@JeanKossaifi JeanKossaifi added the new feature Adding a new feature/method/algorithm label Sep 13, 2018
@kevin-w-li
Copy link

Really NEED THIS!

@StellaAthena
Copy link

@outlace Any progress on this? I've been looking at using TensorLy but I need to be able to have each y_i be a vector rather than a scalar.

@JeanKossaifi
Copy link
Member

I am completely busy the coming month so I don't think I'll have any bandwidth to work on this for a few weeks. Is anyone interested in having a try?

Extending y_i from scalar to vector is fairly straightforward, especially for tensor regression with CP weights.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Adding a new feature/method/algorithm
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants