mtt

MATLAB Tensor Tools
授权协议 BSD-2-Clause License
开发语言
所属分类 应用工具、 科研计算工具
软件类型 开源软件
地区 不详
投 递 者 沈单弓
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Last update: 08/09/2014

MTT

Matlab Tensor Tools is an easy-to-use library to work with tensors.

See also:

Presentation about Matrix and Tensor Tools for Computer Vision 
http://www.slideshare.net/andrewssobral/matrix-and-tensor-tools-for-computer-vision

LRSLibrary: Low-Rank and Sparse Tools for Background Modeling and Subtraction in Videos
https://github.com/andrewssobral/lrslibrary

IMTSL: Incremental and Multi-feature Tensor Subspace Learning
https://github.com/andrewssobral/imtsl

Citation

If you use this code for your publications, please cite it as:

@misc{asobral2014,
    author       = "Sobral, Andrews",
    title        = "Matlab Tensor Tools",
    year         = "2014",
    url          = "https://github.com/andrewssobral/mtt/"
}

Demos

tensor_demo_operations.m - Basic operations
tensor_demo_hosvd_ihosvd.m - High-order singular value decomposition (Tucker decomposition)
tensor_demo_parafac_als.m - CP decomposition via ALS (Alternating Least-Squares)
tensor_demo_tucker_als.m - Tucker decomposition via ALS (Alternating Least-Squares)
tensor_demo_tsvd.m - t-SVD and inverse t-svd
tensor_demo_ntf.m - Non-Negative Tensor Factorization
tensor_demo_subtensors_ntf_hals.m - Low-rank approximation based Non-Negative Tensor(CP) factorization
tensor_demo_inclearn.m - Incremental tensor learning

Example of tensor operations

A = reshape(1:12,[2,2,3]);
B = reshape(1:12,[2,2,3]);

%% Basic operations
[A1,A2,A3] = tensor_matricization(A);

M22 = reshape(1:4,[2,2]);
M33 = reshape(1:9,[3,3]);
B1 = tensor_nmodeproduct(A,M22,1);
B2 = tensor_nmodeproduct(A,M22,2);
B3 = tensor_nmodeproduct(A,M33,3);

Au = tensor_unfold(A);
A_hat = tensor_fold(Au,size(A));

[A1_] = tensor_slices_frontal(A);
[A2_] = tensor_slices_lateral(A);
[A3_] = tensor_slices_horizontal(A);

[At1_] = tensor_fibers_column(A);
[At2_] = tensor_fibers_row(A);
[At3_] = tensor_fibers_tube(A);

Bt = tensor_transpose(B);
[C] = tensor_product(A,B);

%% HoSVD and iHoSVD decomposition
T = tensor(A);
[core,U] = tensor_hosvd(T);
[T_hat] = tensor_ihosvd(core,U);

%% t-SVD decomposition
[U,S,V] = tensor_t_svd(A);
[C] = tensor_product(U,S);
[A_hat] = tensor_product(C,tensor_transpose(V));

%% Tucker ALS decomposition
r = 10;
T_hat = tucker_als(T,[r r r]);

%% PARAFAC/CP ALS decomposition
T_hat = cp_als(T, r);
  • 题目背景 模板题,无背景 题目描述 给定 22 个多项式 F(x), G(x)F(x),G(x) ,请求出 F(x) * G(x)F(x)∗G(x) 。 系数对 pp 取模,且不保证 pp 可以分解成 p = a \cdot 2^k + 1p=a⋅2k+1 之形式。 输入输出格式 输入格式:   输入共 33 行。 第一行 33 个整数 n, m, pn,m,p ,分别表示 F(x), G(x)F

  • 前言 51nod1258真是道好题。。。 一道题,学会了3个东西:伯努利数,自然数幂和,MTT… 前置科技(其实学MTT的人估计都会。。。) CRT(中国剩余定理) NTT NTT算法的局限 众所周知,NTT是通过原根的性质来进行快速傅里叶变化 不过,同时也对其模数做出了要求,对于一个模数M,若 φ ( M ) \varphi(M) φ(M)中,2的次数较少(小于要转的序列长度)就不可做了 所以,

  • MTT

    任意模数FFT时记M为sqrt(mo) 将每个数a分为a/M,a%M后分别进行三次实数FFT const LL mo=1e9+7; const LL M=sqrt(mo); const LDB pi=acos(-1); LL cunt[511][511]; struct cp{ LDB r,i; }a1[511][1024],a2[511][1024],tmp[1024

  • MTT:任意模数NTT 概述 有时我们用FFT处理的数据很大,而模数可以分解为\(a\cdot 2^k+1\)的形式。次数用FFT精度不够,用NTT又找不到足够大的模数,于是MTT就应运而生了。 MTT没有模数的限制,比NTT更加自由,应用广泛,可以用于任意模数或很大的数。 MTT MTT是基于NTT的,其思想很简单,就是做多次NTT,每次使用不同的素数,然后使用CRT合并解,在合并的过程中模最终

  • 题目链接:点击查看 题目大意:给出一个长度为 n n n 的多项式 F ( x ) F(x) F(x) 和一个长度为 m m m 的多项式 G ( x ) G(x) G(x),求 F ( x ) ∗ G ( x ) F(x)*G(x) F(x)∗G(x),模数任意,值域 1 e 9 1e9 1e9 题目分析:如果不取模的话极限情况下会达到 1 0 9 ∗ 1 0 9 ∗ 1 0 5 = 1 0 2

相关阅读

相关文章

相关问答

相关文档