Current location - Training Enrollment Network - Mathematics courses - What is the fast calculation method of kernel density estimation?
What is the fast calculation method of kernel density estimation?
What is the fast calculation method of kernel density estimation? Histogram density estimation is a more traditional nonparametric density estimation method. Usually, what we do is:

1 Divides the data interval covered by the data value into several equal subintervals.

When a data value falls into this corresponding subinterval, the height of this subinterval block is correspondingly increased by one unit.

For example, on Wikipedia:

Now there are six data points: x 1 =-2. 1, x2 =- 1.3, x3 =-0.4, x4 = 1.9, X5 = 5. 1, and X6 = 6. We take the width of the subinterval as 2.

Figure 1 histogram

In this way, we use the sample data to construct the probability density function.

However, it is obvious from the figure that there are still some imperfections in using histogram to estimate the density function:

1 density function is not smooth.

The density function of 2 is greatly influenced by the width of subinterval. If we take 0.5, 5 and so on, the density function constructed is obviously very different from the density function with width 2.

When the data dimension is 1 2, the use of histogram is very common, but when the data dimension increases, this method has limitations.

The method based on kernel density estimation is not limited by histogram 3. And when we use a smooth kernel, the probability density function is also smooth; But when we use non-smooth kernel, the probability density function is still discontinuous.

Estimation of nuclear density;

Kernel density estimation is a function used to estimate unknown density in probability theory, which belongs to one of the independent variable test methods. It was proposed by Rosenblat (1955) and Emmanuel Parcen (1962), also known as Parcen window.

Assuming that the sample data values obey the unknown probability density function in D-dimensional space, the probability in region R is:

Probability p means that the probability of each sample data point falling into the region r is p, assuming that k of the n sample data points fall into the region r, then it should obey the binomial distribution:

According to the knowledge of probability, when the data of n samples is large, K is approximately equal to N * P. On the other hand, if we assume that the region R is small enough, then P is approximately equal to p(x)*V(V is the space of region R). By combining two inequalities, we can get:

( 1)

Then, there are two methods to estimate p(x) according to equation (1):

1 K is a constant, and we estimate the density function by determining the size of the region v, so we use the K nearest neighbor method (not discussed in detail here).

2 V is a constant, we estimate the density function by determining the size of k, and then we adopt the kernel method.

Let's follow the idea of 2.

Assuming that the region R is a minimal cube with the center of X and the side length of H (that is, V is constant), what we need to consider now is the number k of data points falling into the solid. We define a kernel function:

The meaning of this function is that the data dimension is D dimension. When the sample data points fall into the small cube, the function value is 1, otherwise it is 0. Therefore, the total number k of data points falling into the cube can be expressed as:

(2)

Then, according to equation (1), substituting equation (2) into (1), we can get:

Is there any quick calculation method? First, basic training

Judging from the psychological characteristics of primary school students of different ages, the basic requirements of oral arithmetic are different. The middle and low grades are mainly in the addition of one or two digits. It is best for senior students to take one-digit multiplied by two-digit oral calculation as the basic training. The specific requirement of oral calculation is to multiply one digit by the number in the tenth place of two digits, immediately add the product of one digit and the number in the first digit of two digits to the three digits, and quickly say the result. This kind of oral arithmetic training, including the practice of the spatial concept of numbers, the comparison of numbers and the memory training, can be said to be the sublimation training of digital abstract thinking in primary school, which is very beneficial to promoting the development of thinking and intelligence. This exercise can be arranged in two periods. One is an early reading class, and the other is an assignment group. Each group is divided as follows: select a digit, and one or ten digits in the corresponding two digits all contain a certain number. Each group has 18 rows. Let the students write the formula first, and then write the numbers directly after several oral calculations. After this lasts for a period of time (usually 2 ~ 3 months), the speed and accuracy of oral calculation will be greatly improved.

Second, targeted training.

The main form of elementary school senior grade series has changed from integer to fraction. In the operation of numbers, fractional addition with different denominators is the most time-consuming and error-prone place for students, and it is also the key and difficult point in teaching and learning. How to break this key and difficult point? Through research, comparison and teaching practice, it is proved that it is correct to add the scores of different denominators in the oral operation of fractions. Through analysis and induction, there are only three cases of addition (subtraction) of different denominator fractions, and each case has its own oral calculation rules. As long as students master it, the problem will be solved.

1. Two fractions, where the big number in the denominator is a multiple of the decimal.

For example, "112+1/3", in this case, oral calculation is relatively easy. The method is: the big denominator is the common denominator of the two denominators. As long as the small denominator is multiplied by the multiple until it is the same as the big number, the denominator is multiplied by several times, and the numerator is multiplied by the same multiple, you can perform oral calculation by adding the scores of the same denominator:

2. Two fractions, the denominator is a prime number. This situation is more difficult in form, and it is also the biggest headache for students, but it can be turned into an easy thing: except for the future, the common denominator is the product of two denominators, and the numerator is the sum of the products of the numerator of each fraction and another denominator (if it is subtraction, it is the difference between the two products), such as 2/7+3/ 13, and the oral calculation process is: the common denominator is 7 × 650.

If the numerator of both fractions is 1, oral calculation is faster. For example, "1/7+ 1/9", the common denominator is the product of two denominators (63), and the numerator is the sum of two denominators (16).

3. Two fractions and two denominators are neither prime numbers nor multiples of decimals. In this case, short division is usually used to find the mother of centimeters, but in fact, the total score can be calculated directly in the formula and the result can be obtained quickly. The common denominator can be obtained by multiplying the large numbers in the denominator. The specific method is: multiply the big denominator (large number) by the expansion until it is a multiple of the decimal of another denominator. For example, 1/8+3/ 10 expands a large number 10, 2 times, 3 times and 4 times, and each expansion is compared with the decimal 8 to see if it is a multiple of 8. When expanded to 4 times, it is a multiple of 8 (5 times), then the common denominator is 40, and the numerator is also expanded accordingly.

The above three situations are also applicable to the oral calculation method in addition and subtraction with fractions.

Third, memory training.

The content of advanced computing is extensive, comprehensive and comprehensive. Some common operations are often encountered in real life. Some of these operations have no specific rules for oral calculation, and they must be solved by strengthening memory training. The main contents are:

The square result of 1 0 ~ 24 in1.natural number;

2. Approximate value of pi 3. Product of14 with a digit and several common numbers, such as 12, 15, 16 and 25;

3. The decimal values of the simplest fractions with denominators of 2, 4, 5, 8, 10, 16, 20, 25, that is, the reciprocity of these fractions and decimals.

The results of these figures are often used in daily work and real life. After mastering and memorizing skillfully, it can be converted into energy, resulting in high efficiency in calculation.

Fourth, regular training.

1. Master the operation rules. There are five laws in this respect: the commutative law and associative law of addition; Commutative law, associative law and multiplicative distribution law. Among them, multiplication and division have a wide range of uses and forms, including positive and negative use, integers, decimals and fractions. When a fraction is multiplied by an integer, students often ignore the application of the law of multiplication and distribution, which makes the calculation complicated. For example, 2000/ 16×8, the result can be calculated by using the multiplication distribution law of the straight interface, which is 100 1.5, but it is time-consuming and easy to make mistakes by using the general method of tampering with scores. In addition, there are applications of subtraction and quotient invariance.

2. Regular training. Mainly the oral calculation method of the result that the number in the unit is the square of the two digits of 5 (the method is abbreviated).

3. Master some special circumstances. For example, in fractional subtraction, molecules are not reduced enough after division, and the reduced molecules are often larger than the reduced molecules 1, 2, 3 and other smaller numbers, regardless of the denominator, can be directly calculated. For example, 12/7-6/7, its numerator is only 1, and its difference numerator must be smaller than the denominator 1, and the result is 6/7 without calculation. Another example is: 194/99-97/99, where the difference between numerator and denominator is 2 and the result is 97/99. When the reduced molecule is 3, 4 and 5 larger than the reduced molecule, the result can be calculated quickly. Another example is the oral calculation of the product of any two digits and 1.5, which is two digits plus half of it.

Comprehensive training of verbs (abbreviation of verb)

1. The comprehensive performance of the above situation;

2. The comprehensive performance of integers, decimals and fractions;

3. Comprehensive training of four mixed operation sequences.

Comprehensive training is conducive to the improvement of judgment ability, reaction speed and the consolidation of oral calculation methods.

Of course, in order for students to master these situations skillfully, teachers should first use them skillfully, and then they can be handy in guidance and improve the effect. At the same time, training should be persistent, and it is difficult to achieve the expected results by fishing for three days and drying the net for two days.

Is there any quick way to calculate the square of 25? Calculate the square of a two-digit number with a unit of 5. The first or second digit of its square number is the product of its ten digits and ten digits plus one. The last two digits of its square are 25.

For example, to calculate the square of 25, we only need to multiply the ten digits (2) by a number larger than it (2) (2+ 1 = 3), 2*3=6, and then add 25,25 * 25 = 625 at the end.

Similarly, to calculate the square of 35, we simply need to multiply the ten digits (3) by a number (3+ 1 = 4) larger than it (3), 3*4= 12, and then add 25,35 * 35 = 65438 at the end.

Fast calculation method? 1 .10 times 10

Formula: head joint, tail to tail, tail to tail.

For example: 12× 14=?

Solution: 1× 1= 1.

2+4=6

2×4=8

12× 14= 168

Note: Numbers are multiplied. If two digits are not enough, use 0 to occupy the space.

2. The heads are the same and the tails are complementary (the sum of the tails is equal to 10):

Formula: After a head is added with 1, the head is multiplied by the head and the tail is multiplied by the tail.

For example: 23×27=?

Solution: 2+ 1 = 3

2×3=6

3×7=2 1

23×27=62 1

Note: Numbers are multiplied. If two digits are not enough, use 0 to occupy the space.

3. The first multiplier is complementary and the other multiplier has the same number:

Formula: After a head is added with 1, the head is multiplied by the head and the tail is multiplied by the tail.

For example: 37×44=?

Solution: 3+ 1=4

4×4= 16

7×4=28

37×44= 1628

Note: Numbers are multiplied. If two digits are not enough, use 0 to occupy the space.

4. Eleven times eleven:

Formula: head joint, head joint, tail to tail.

For example: 2 1×4 1=?

Answer: 2×4=8

2+4=6

1× 1= 1

2 1×4 1=86 1

5. 1 1 times any number:

Formula: head and tail do not move down, middle and pull down.

For example: 1 1×23 125=?

Answer: 2+3=5

3+ 1=4

1+2=3

2+5=7

2 and 5 are at the beginning and end respectively.

1 1×23 125=254375

Note: If you add up to ten, you will get one.

6. Multiply a dozen by any number:

Formula: The first digit of the second multiplier does not drop, the single digit of the first factor multiplies each digit after the second factor, and then drops.

For example: 13×326=?

Solution: 13 bit is 3.

3×3+2= 1 1

3×2+6= 12

3×6= 18

13×326=4238

Note: If you add up to ten, you will get one.

How to calculate the fast algorithm: the number being processed in the multiplicand is called "standard", and the number from the first digit to the last digit on the right side of the standard is called "last digit". After the standard is multiplied, only the single digit of the product is taken as "this bit", and the number to be carried after the standard is multiplied by the multiplier is "the last bit".

Examples are as follows:

(Example) Fill in 0 before the first digit of the multiplicand and list the formula:

0847536×2= 1695072

The carry rule of multiplier 2 is "2 full 5 decimal 1"

0×2 is a 0, the last digit is 8, and the last digit is 1, so it is 1.

8×2 is a 6, and the last digit is 4. If you don't advance, you will get 6 points.

4×2 is an 8, followed by 7, and when it is 5, it will enter 1.

8 ten 1 9.

7×2 This is a 4, followed by a 5. When it is full, enter 1.

4 ten 1 get 5.

5×2 is 0, and if the last digit 3 is not input, it is 0.

3×2 is a 6, followed by 6, and when it is full, it enters 1.

6 ten 1 get 7.

6×2 This is a 2, and there is no postposition, so you get 2.

The fastest mathematical calculation method is 1. If they are all A's, just mentally calculate 1-4%=96%, 96% * A;;

You lost -A*4% plus a.

Fast calculation method of 25×46 plus 50×27 The fastest calculation method is 25× 46+50× 27 = 25× (46+2× 27) = 25×100 = 2500.

Using multiplicative associative law

Simple and fast calculation methods 67/70 * 70/73 ... 91/94 * 94/97 * 97/100 are all omitted.

67/ 100

Is there any quick calculation method for the fabrication and installation of pipe supports? There are two ways to calculate pipe supports and hangers:

Estimation: Due to the tight time, I can only accumulate according to my years of experience, and directly calculate by N kilograms per meter.

Calculation: the condition is that there is the specification (pipe diameter) of the pipeline; Quantity (n meters for riser and n meters for horizontal pipe); Spacing (different pipe diameters and spacing); According to the specifications of section steel adopted in the atlas (or actual operation).

16×24÷3÷8÷4 fastest calculation method 16×24÷3÷8÷4

=( 16÷4)×24÷(3×8)

=4× 1

=4