资源简介
偏最小二乘算法的matlab程序,主成分提取准则中的交叉有效性准则的调用函数。
代码片段和文件信息
function [presscumpressrmsecvrmsec] = crossval(xyrmcvmlvsplititermcoutosc);
%CROSSVAL Cross-validation for PCA PLS and PCR
% This function does cross-validation for regression
% and principal components analysis models by several
% different methods including:
% leave-one-out (‘loo‘)
% venetian blind (‘vet‘)
% continuous blocks (‘con‘)
% repeated random test sets (‘rnd‘)
%
% The inputs are the scaled predictor variable matrix (x)
% predicted variable (y not needed for PCA models) regression method
% or PCA (rm) which can be:
% PLS via NIPALS algorithm (‘nip‘) (Old slow way of doing PLS)
% PLS via SIMPLS algorithm (‘sim‘) (New fast way of doing PLS)
% PCR (‘pcr‘)
% MLR (‘mlr‘)
% PCA (‘pca‘)
%
% cross-validation method (cvm as described above) number of latent
% variables or principal components to calculate (lv) number of
% sections to split the data into (split needed for ‘vet‘ ‘con‘
% and ‘rnd‘ cross validations) number of iterations (iter needed
% for ‘rnd‘) an optional variable which suppresses mean centering
% of the subsets when set to 0 (mc) an optional variable which
% supresses the output when set to 0 (out) and an optional variable
% which specifies the number of orthogonal signal correction components
% to use (osc) which can be a three element vector which specifies
% number of components iterations and tolerance (osc = [nocompitertol]).
%
% The outputs are the predictive residual error
% sum of squares (press) for each subset and the cumulative
% PRESS (cumpress). Note that for multivariate y the press
% output is grouped by output variable i.e. all of the PRESS values
% for the first variable are followed by all of the PRESS values
% for the second variable etc. Optional outputs are the root mean
% square error of cross-validation (rmsecv) and root mean square
% error of (rmsec).
%
%I/O: [presscumpressrmsecvrmsec] = crossval(xyrmcvmlvsplititermcoutosc);
%
% Some examples of how you might call CROSSVAL are:
% [presscumpress] = crossval(xy‘mlr‘‘loo‘);
% [presscumpress] = crossval(xy‘nip‘‘loo‘10);
% [presscumpress] = crossval(xy‘pcr‘‘vet‘103);
% [presscumpress] = crossval(xy‘nip‘‘con‘105);
% [presscumpress] = crossval(xy‘sim‘‘rnd‘10320);
%
% To suppress mean centering in the first two cases:
% [presscumpress] = crossval(xy‘mlr‘‘loo‘[][][]0);
% [presscumpress] = crossval(xy‘nip‘‘loo‘10[][]0);
%
% To add orthogonal signal correction with 2 components:
% [presscumpress] = crossval(xy‘sim‘‘vet‘103[][][]2);
% [presscumpress] = crossval(xy‘pcr‘‘con‘103[][][]2);
%
% For use with PCA you might call CROSSVAL like:
% [presscumpress] = crossval(x[]‘pca‘‘loo‘10);
% [presscumpress] = crossval(x
- 上一篇:OFDM误码率
- 下一篇:偏最小二乘算法多输入单输出系统
相关资源
- 偏最小二乘算法多输入单输出系统
- matlab求取光斑中心
-
详解MATLAB-Simuli
nk通信系统建模与仿 - 指纹定位算法仿真matlab代码
- 三角级数法路面谱生成路面及与标准
- 目标跟踪算法KCF加入APCE评价标准的
- LEACH协议Matlab仿真代码
- 感知器与SVM分类
- qpsk在matlab上的仿真
- 利用Matlab编写,记录二值化图像像素
- 利用Matlab编写,记录二值化图像像素
- 元胞自动机交通流模拟matlab代码和相
- 帝国竞争算法ICA的matlab实现
- 连续域蚁群算法的matlab实现
- matlab小波去噪详解超全超全有程序.
- 图像追踪matlab
- 2019美赛B题代码
- 基于MATLAB的窗函数法设计FIR数字滤波
- MATLAB煤块识别
-
MPC预测控制算法中的DMC算法simuli
n - 基于matlab的指纹识别
- Matlab 蚁群算法
-
电机闭环仿真_Matlab_SIMUli
nk - 基于MATLAB的车牌识别开题报告
-
Simuli
nk仿真模型-逆变驱动SPWM驱动 - 基于MATLAB的拼图游戏
- 山东大学数值计算实验13-14matlab代码、
- 山东大学数值计算实验七matlab代码+实
- 最优化-牛顿法求最优解matlab程序
- 5种MATLAB求解MTSP问题代码
评论
共有 条评论