Three normalization methods of MATLAB

Source: Internet
Author: User

The specific function of normalization is to summarize the statistical distribution of uniform samples. Normalization between 0-1 is the probability distribution of statistics, and normalization between -1--+1 is a statistical coordinate distribution. Normalization has the same meaning, unity and oneness. Whether it is for modeling or for computing, first of all the basic units of measurement to the same, the neural network is the sample in the event of statistical probability of training (probability calculation) and prediction, and the value of the sigmoid function is between 0 to 1, the output of the last node of the network is the same, Therefore, the output of the sample is often normalized. Normalization is a statistical probability distribution of unity between 0-1, and when all the input signals of a sample are positive, the weights associated with the first hidden layer neurons can only increase or decrease at the same time, resulting in a slow learning rate. In addition, singular sample data is often present in the data, and the network training time is increased due to the existence of singular sample data, which may cause the network to be unable to converge. In order to avoid this situation and the convenience of data processing, speed up the network learning speed, the input signal can be normalized, so that the input signal of all samples is close to 0 or less than its mean variance.

In MATLAB, there are three ways to use normalization:

First, the MATLAB language itself programming, commonly used functions are the following:

1. Linear function conversion, the expression is as follows:

y= (X-minvalue)/(Maxvalue-minvalue) (from one to 0 1)

y=0.1+ (x-min)/(max-min) * (0.9-0.1) (from one to 0.1-0.9)

Description: X, Y are the pre-and post-conversion values, MaxValue, MinValue are the maximum and minimum values for the samples, respectively.

2. Logarithmic function conversion, the expression is as follows:

Y=LOG10 (x)

Description: A logarithmic function transformation with a base of 10.

3. Inverse cotangent function conversion, the expression is as follows:

Y=atan (x) *2/pi

Ii. premnmx, Tramnmx, Postmnmx, Mapminmax

The PREMNMX function is used to normalized the input data or output data of the network, and the normalized data will be distributed within the [ -1,1] interval.

The syntax format for the PREMNMX statement is: [Pn,minp,maxp,tn,mint,maxt]=premnmx (P,t), where p,t are raw input and output data, respectively.

If you are using normalized sample data while training the network, then the new data used in the future use of the network should also receive the same preprocessing as the sample data, which will use the TRAMNMX function:

The syntax format for the TRAMNMX statement is: [Pn]=tramnmx (P,MINP,MAXP)

where P and PN are the input data before and after the transformation, MAXP and MINP respectively are the maximum and minimum values found by the PREMNMX function.

The results of the network output need to be reversed to restore the original data, the commonly used functions are: Postmnmx.

The syntax format for the POSTMNMX statement is: [PN] = Postmnmx (P,MINP,MAXP)

where P and PN are the input data before and after the transformation, MAXP and MINP respectively are the maximum and minimum values found by the PREMNMX function.

Another function is Mapminmax, which can return each line of the matrix to [-1 1].

The syntax format for the MAPMINMAX statement is: [Y1,ps] = Mapminmax (x1)

Where X1 is a matrix that needs to be normalized y1 is the result.

When a second set of data needs to be normalized, you can do the same with the following method

y2 = Mapminmax (' Apply ', X2,ps)

You can use the following command when you need to restore a data that is normalized to one: X1_again = Mapminmax (' reverse ', y1,ps)

Three, PRESTD, POSTSTD, TRASTD

The PRESTD is normalized to a unit variance and a 0 mean value.

PMINP and MAXP are the minimum and maximum values in P respectively. Mint and Maxt are the minimum and maximum values for t respectively.

Three normalization methods of MATLAB

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.