资源简介
张量分解工具包 高维数据SVD分解 多重因子分析的工具
代码片段和文件信息
function [G]=calcore(XFactorsOptionsOMissingExist);
%CALCORE Calculate the Tucker core
%
%
% [G]=calcore(XFactorsOptions);
% [G]=calcore(XFactors);
%
% This algorithm applies to the general N-way case so
% the unfolded X can have any number of dimensions. The principles of
% ‘projections‘ and ‘systematic unfolding methodology (SUM)‘ are used
% in this algorithm so orthogonality is required.
% This algorithm can handle missing values in X and
% also allows for TUCKER2 models using the an empty matrix in the
% corresponding cell of Factors.
% The variable ‘Factors‘ must contain the stringed-out factors.
% Copyright (C) 1995-2006 Rasmus Bro & Claus Andersson
% Copenhagen University DK-1958 Frederiksberg Denmark rb@life.ku.dk
%
% This program is free software; you can redistribute it and/or modify it under
% the terms of the GNU General Public License as published by the Free Software
% Foundation; either version 2 of the License or (at your option) any later version.
%
% This program is distributed in the hope that it will be useful but WITHOUT
% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
% FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
% You should have received a copy of the GNU General Public License along with
% this program; if not write to the Free Software Foundation Inc. 51 Franklin
% Street Fifth Floor Boston MA 02110-1301 USA.
format compact
format long
DimX = size(X);
X = reshape(XDimX(1)prod(DimX(2:end)));
ff = [];
for f=1:length(Factors)
ff=[ff;Factors{f}(:)];
Fac(f)=size(Factors{f}2);
if isempty(Factors{f}) % ‘Tucker2‘ - i.e. no compression in that mode
Fac(f) = -1;
end
end
Factors = ff;
% Initialize system variables
if length(Fac)==1
Fac=Fac*ones(size(DimX));
end;
Fac_orig=Fac;
i=find(Fac==-1);
Fac(i)=zeros(1length(i));
N=size(Fac2);
FIdx0=zeros(1N);
FIdx1=zeros(1N);
if ~exist(‘MissingExist‘)
if sum(isnan(X(:)))>0
MissingExist=1;
else
MissingExist=0;
end;
end;
FIdx0=cumsum([1 DimX(1:N-1).*Fac(1:N-1)]);
FIdx1=cumsum([DimX.*Fac]);
if ~exist(‘O‘) | isempty(O)
O=1;
end;
if O %means orthogonality
CurDimX=DimX;
RedData=X;
for c=1:N
if Fac_orig(c)==-1
kthFactor=eye(DimX(c));
CurDimX(c)=DimX(c);
else
kthFactor=reshape(Factors(FIdx0(c):FIdx1(c))DimX(c)Fac(c));
CurDimX(c)=Fac(c);
end;
if MissingExist
RedData=missmult(kthFactor‘RedData);
else
RedData=kthFactor‘*RedData;
end;
if c~=N
newi=CurDimX(c+1);
newj=prod(CurDimX)/CurDimX(c+1);
else
newi=CurDimX(1);
newj=prod(CurDimX)/CurDimX(1);
end;
RedData=reshape(RedData‘newinewj);
end;
G=RedData;
else %oblique factors
LMatTmp=1;
if Fac_
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1616 2007-05-09 19:44 ver3.1\brod.mat
文件 3718 2007-05-09 19:43 ver3.1\calcore.m
文件 1348 2007-05-15 08:31 ver3.1\ckron.m
文件 492152 2007-05-09 19:44 ver3.1\claus.mat
文件 667 2007-05-09 19:43 ver3.1\cmatrep.m
文件 154 2007-05-09 19:43 ver3.1\complpol.m
文件 4580 2007-07-15 22:12 ver3.1\contents.m
文件 7557 2007-05-09 19:43 ver3.1\corcond.m
文件 1405 2007-05-09 19:43 ver3.1\coredian.m
文件 1856 2007-05-09 19:43 ver3.1\coreswdn.m
文件 1294 2007-05-09 19:43 ver3.1\corevarn.m
文件 1417392 2007-05-09 19:44 ver3.1\dataset1.mat
文件 1403840 2007-05-09 19:44 ver3.1\dataset1res.mat
文件 1564496 2007-05-09 19:44 ver3.1\dataset2res.mat
文件 1565536 2007-05-09 19:44 ver3.1\dataset3res.mat
文件 640 2007-05-09 19:43 ver3.1\def.mat
文件 1310 2007-05-09 19:43 ver3.1\demos.m
文件 2770 2007-05-09 19:43 ver3.1\derdia3.m
文件 3069 2007-05-09 19:43 ver3.1\derswd3.m
文件 4067 2007-05-09 19:43 ver3.1\dervar3.m
文件 2870128 2007-05-09 19:44 ver3.1\dorrit.mat
文件 3538 2007-08-07 12:17 ver3.1\dtld.m
文件 2298 2007-05-09 19:43 ver3.1\explcore.m
文件 1753 2007-05-09 19:43 ver3.1\fac2let.m
文件 2684 2007-05-09 19:43 ver3.1\fastnnls.m
文件 7124 2007-05-09 19:43 ver3.1\fnipals.m
文件 2920 2007-05-09 19:43 ver3.1\fnnls.m
文件 1084 2007-05-09 19:43 ver3.1\getindxn.m
文件 3283 2007-08-07 12:17 ver3.1\gram.m
文件 1815 2007-05-09 19:43 ver3.1\gsm.m
文件 8576 2007-05-09 19:44 ver3.1\howto1.mat
............此处省略58个文件信息
- 上一篇:小巧的螺旋桨设计软件
- 下一篇:CAD转excel神器
相关资源
- 电力仿真软件 psat 说明书
- 核函数的所有代码
- 指纹识别系统包含了指纹数据库 源码
- 胡广书现代信号处理课后代码.rar
- SaDE差分进化算法的程序
- DBN源码,深度学习领域的适合初学者
- 有关逻辑门限值控制的ABS算法的毕业
- FPGA数字信号处理实现原理及方法-清华
- 数学建模算法与应用第2版习题解答的
- 三相异步电动机运行仿真及GUI设计
- 基于张量分解的推荐算法研究_黄丹
- 小波特征提取与支持向量机识别
- 轨迹优化软件gpops5.2
- 混沌系统同步控制的代码
- 数字听诊器设计
- 通过中心频率来确定VMD分解个数,程
- 基于混沌的语音加密系统设计.rar
- 2017年数学建模原题ABCD题目,含附件
- 数字图像处理期末作业
- 利用GPML V4.2工具箱实现高斯过程回归
- 《电力电子、电机控制系统的建模和
- indeo 5
- 求实验数据的spwvd分布,包括功率谱,
- 伪Wigner-Ville分布,可以运行。
- ceemd分解,可以运行
- 投影仪标定工具箱
- 基于PCA特征脸的人脸识别
- Stateflow系统建模技术
- 捷联惯导解算
- GPS/INS Integrated Navigation Simulation
评论
共有 条评论