⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 center2data.m.svn-base

📁 a function inside machine learning
💻 SVN-BASE
字号:
function [cX1, cX2] = center2Data(X1, X2) 
%Centers a matrix by taking the mean of each column (feature) of X1 and X2 and 
%subtracting the mean from feature value. 
%
%inputs 
% M is the matrix to be centered
%
%outputs 
% cM is the centered matrix 

meanX = mean([X1; X2]);
cX1 = X1 - ones(size(X1,1),1)*meanX;
cX2 = X2 - ones(size(X2,1),1)*meanX;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -