function x = normalize(x, mu, sigma) x = bsxfun(@minus, x, mu); x = bsxfun(@rdivide, x, sigma); end 这里归一化使用的函数为: x′=x−μσ 还可根据具体问题,使用特定的归一化函数: (1)web's law normalization: x←x⋅log(1+∥x∥2/0.03)∥x∥2 (2)unit norm normalization: x←x∥x∥2 (3)no normalization
一 matlab作图 (1)在图形文件figure的菜单上点击file->export setup, 在size选项中,对"expand axes to fill figure"选项打勾, 再点击:Apply to figure 即可. (2)matlab作图1号线和2号线差距挺大,不适合学术论文作图,没有找到1.5号线性,目前使用发现是只有整数线粗 (3)matlab作图坐标轴默认是arial字体,打印时较粗,最好编程控制字体,'fontname','Time New
peaks; axis tight %Set the axis limits to equal the range of the data axis square axis 'auto x' %x轴坐标上下限自动调整 axis off %Plot a surface without displaying the axes lines and background. set(gca,'Visible','off'); %消除坐标轴,显示范围的大小没有改变,同上句 %更多特性
一.mapminmax Process matrices by mapping row minimum and maximum values to [-1 1] 意思是将矩阵的每一行处理成[-1,1]区间,此时对于模式识别或者其他统计学来说,数据应该是每一列是一个样本,每一行是多个样本的同一维,即对于一个M*N的矩阵来说,样本的维度是M,样本数目是N,一共N列N个样本. 其主要调用形式有: 1. [Y,PS] = mapminmax(X,YMIN,YMAX) % 将矩阵的每一行压缩到 [