{"id":17140178,"url":"https://github.com/andrewssobral/mtt","last_synced_at":"2025-04-13T09:32:25.063Z","repository":{"id":20522294,"uuid":"23801265","full_name":"andrewssobral/mtt","owner":"andrewssobral","description":"MATLAB Tensor Tools","archived":false,"fork":false,"pushed_at":"2021-03-12T11:18:44.000Z","size":28477,"stargazers_count":86,"open_issues_count":0,"forks_count":45,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-27T01:35:35.596Z","etag":null,"topics":["matlab","matlab-tensor","tensor"],"latest_commit_sha":null,"homepage":null,"language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrewssobral.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-08T17:42:47.000Z","updated_at":"2025-03-11T16:38:10.000Z","dependencies_parsed_at":"2022-07-26T09:17:54.482Z","dependency_job_id":null,"html_url":"https://github.com/andrewssobral/mtt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewssobral%2Fmtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewssobral%2Fmtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewssobral%2Fmtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewssobral%2Fmtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewssobral","download_url":"https://codeload.github.com/andrewssobral/mtt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248690889,"owners_count":21146225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["matlab","matlab-tensor","tensor"],"created_at":"2024-10-14T20:14:10.293Z","updated_at":"2025-04-13T09:32:20.053Z","avatar_url":"https://github.com/andrewssobral.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![View MTT on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/47773-mtt)\n\nLast update: **08/09/2014**\n\nMTT\n---\nMatlab Tensor Tools is an easy-to-use library to work with tensors.\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/andrewssobral/mtt/master/docs/tensor_slices_full.png\" /\u003e\u003c/p\u003e\n\n```\nSee also:\n\nPresentation about Matrix and Tensor Tools for Computer Vision \nhttp://www.slideshare.net/andrewssobral/matrix-and-tensor-tools-for-computer-vision\n\nLRSLibrary: Low-Rank and Sparse Tools for Background Modeling and Subtraction in Videos\nhttps://github.com/andrewssobral/lrslibrary\n\nIMTSL: Incremental and Multi-feature Tensor Subspace Learning\nhttps://github.com/andrewssobral/imtsl\n```\n\nCitation\n---------\nIf you use this code for your publications, please cite it as:\n```\n@misc{asobral2014,\n    author       = \"Sobral, Andrews\",\n    title        = \"Matlab Tensor Tools\",\n    year         = \"2014\",\n    url          = \"https://github.com/andrewssobral/mtt/\"\n}\n```\n\nDemos\n-----\n```\ntensor_demo_operations.m - Basic operations\ntensor_demo_hosvd_ihosvd.m - High-order singular value decomposition (Tucker decomposition)\ntensor_demo_parafac_als.m - CP decomposition via ALS (Alternating Least-Squares)\ntensor_demo_tucker_als.m - Tucker decomposition via ALS (Alternating Least-Squares)\ntensor_demo_tsvd.m - t-SVD and inverse t-svd\ntensor_demo_ntf.m - Non-Negative Tensor Factorization\ntensor_demo_subtensors_ntf_hals.m - Low-rank approximation based Non-Negative Tensor(CP) factorization\ntensor_demo_inclearn.m - Incremental tensor learning\n```\n\nExample of tensor operations\n----------------------------\n```Matlab\nA = reshape(1:12,[2,2,3]);\nB = reshape(1:12,[2,2,3]);\n\n%% Basic operations\n[A1,A2,A3] = tensor_matricization(A);\n\nM22 = reshape(1:4,[2,2]);\nM33 = reshape(1:9,[3,3]);\nB1 = tensor_nmodeproduct(A,M22,1);\nB2 = tensor_nmodeproduct(A,M22,2);\nB3 = tensor_nmodeproduct(A,M33,3);\n\nAu = tensor_unfold(A);\nA_hat = tensor_fold(Au,size(A));\n\n[A1_] = tensor_slices_frontal(A);\n[A2_] = tensor_slices_lateral(A);\n[A3_] = tensor_slices_horizontal(A);\n\n[At1_] = tensor_fibers_column(A);\n[At2_] = tensor_fibers_row(A);\n[At3_] = tensor_fibers_tube(A);\n\nBt = tensor_transpose(B);\n[C] = tensor_product(A,B);\n\n%% HoSVD and iHoSVD decomposition\nT = tensor(A);\n[core,U] = tensor_hosvd(T);\n[T_hat] = tensor_ihosvd(core,U);\n\n%% t-SVD decomposition\n[U,S,V] = tensor_t_svd(A);\n[C] = tensor_product(U,S);\n[A_hat] = tensor_product(C,tensor_transpose(V));\n\n%% Tucker ALS decomposition\nr = 10;\nT_hat = tucker_als(T,[r r r]);\n\n%% PARAFAC/CP ALS decomposition\nT_hat = cp_als(T, r);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewssobral%2Fmtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewssobral%2Fmtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewssobral%2Fmtt/lists"}