【发布时间】:2013-09-15 15:54:25
【问题描述】:
我已将每一列的训练数据矩阵转换为z-scores。对于zscore 的输出中的每一列,我都有mu 和sigma。
我还有另一个矩阵(我的测试数据),我想使用在上一步中获得的mu 和sigma 将其转换为 z-scores。我的实现使用for 循环,如下所示:
TEST_DATA = zeros(num_rows,num_cols,'double');
for rowIdx = 1:num_rows,
for colIdx = 1:num_cols,
TEST_DATA(rowIdx,colIdx)=(input(rowIdx,colIdx)-MU(colIdx))/SIGMA(colIdx);
end
end
在 MATLAB 中有没有更快的方法来实现这一点?
【问题讨论】:
-
更具体。解释 z 分数是什么,并解释您想对数据执行什么操作。
-
@Peter 请参阅编辑后的 OP
标签: matlab machine-learning normalization scaling