Traditional Culture Encyclopedia - Traditional virtues - Data normalization of data preprocessing
Data normalization of data preprocessing
First, a simple zoom.
Divided into: maximum scaling and average scaling.
In simple scaling, our goal is to readjust the values of each dimension of data (these dimensions may be independent of each other) so that the final data vector falls within the interval. Common processing is to divide these pixel values by 255, so that it can be scaled to [0, 1].
2. Sample-by-sample average subtraction (also called DC component removal)
If your data is stationary (that is, the statistics of all dimensions of the data obey the same distribution), then you can consider subtracting the statistical average of the data from each sample (sample by sample calculation).
For example, for an image, this normalization can remove the average brightness value of the image. Many times, we are not interested in the illumination of the image, but pay more attention to its content. At this time, it is meaningful to remove the average pixel value of each data point.
Note: Although this method is widely used in images, we need to be extra careful when dealing with color images, specifically, because not all pixels in different color channels have fixed characteristics.
take for example
The classification_demo.m script file in Caffe demo has this treatment for the original data.
im _ data = im _ data-mean _ data;
Thirdly, feature standardization (making the mean and unit variance of all features in the data set zero)
The specific method of feature standardization is to calculate the average value of data in each dimension (using all data), and then reduce it in each dimension.
Remove the mean. The next step is to divide each dimension of the data by the standard deviation of the data in that dimension.
Simply put: subtract the average value of the original data and divide it by the standard deviation of the original data.
example
x= [ones(m, 1),x];
%x includes 2 eigenvalues and 1 offsets, so the scale of matrix x is x:[mX3].
sigma = STD(x); Standard deviation of %X; Mu= mean (x); Average value of %X; x(:,2)= (x(:,2) - mu(2))。 /sigma(2); x(:,3)= (x(:,3) - mu(3))。 /sigma(3);
- Previous article:Understand funeral culture (local customs)
- Next article:China Ordnance Science Research Institute
- Related articles
- What are the specific differences between local houses?
- Will the traditional model be replaced by the Internet model?
- Integrated design is helpful to reduce the cost and improve the efficiency of offshore wind power generation
- Top Ten China Leather Shoes King
- Do trademarks need copyright protection?
- What are the innovations of remote monitoring and alarm technology for production safety?
- A Course in Literary Theory (Chapter 12 Lyrical Works)
- Benefits of Hydroelectric Power Generation (5)
- It is clearly Hubei province, but it is not "Hubei" at all: Enshi Prefecture in Hubei with Chongqing flavor.
- What does the traditional marketing number mean?