A teacher, a leader, a goal of all students admitted to the school's story

Today, small evening to tell you a story ...

v2-b8749c02a1c08a600012ae0b57b393d7_b.png

Once upon a time there was a mountain ...

Mountains, a seat school ...

School, a teacher, a leader, as well as the lovely five sprites (science) female (students).

The five students' names are: bunny, Xiaoqing, paths, a small sound, small evening . Their targets were college entrance Tsinghua University, Tsinghua University, Tsinghua University, Tsinghua University, Zhejiang University . But regardless of their target, in the persecution of parents:

1. Assuming Zhejiang University after a line, but not over the line Tsinghua University, Zhejiang University on it. (I would like to test Tsinghua University students will be very sad)
2. Assuming if after Tsinghua line, then it must be on the Tsinghua University, Zhejiang University even if the goal is, not reported. (Zhejiang University students wanted to test so sad)

Then the teacher training objectives do not allow all students on the Tsinghua University, but let every student to reach their target heart! Zhejiang University students want to go, you can not take too high, so on the Tsinghua University. I want to go to Tsinghua University students, will test high enough to avoid on the Zhejiang University.

1. The teacher was very strange that he would develop an energy distribution schedule every day, such as the teacher has 100 parts of energy every day, he will give each student distribution of energy. First day of school, because he is not familiar with these students, and he averaged distribution of energy to these five students, that energy can get 20 copies per person.

2. The class teacher during the day and how it? He will focus on the culture of today and those of energy distribution plan Effort many students. On this day he would say many times classes, each class the end of it, will arrange a Quiz. And according to each student's report card after the exam, the exam is to evaluate the success rate .

2. Note, however, ah, how to measure this test unsuccessful? Focus on coming, this teacher is wonderful! He mainly to see the focus of today's students can be admitted to school goal! For example, today the teacher's effort in 100 parts, 92 parts to a small evening, the remaining eight divided equally among the other four bunny people. Well! Nowadays! As long as small evening to reach the target (ie just admitted to Zhejiang University), then four other people do not achieve their goals is also all right (¯∇¯), then test the success rate was 92%. But if the exam did not reach the target small and medium-Xi (ie, accidentally admitted to Tsinghua University), four others have reached the target (ie, admitted to Tsinghua University), believes the success rate of only 8% of the exam! (I seem to hear someone say this teacher is not retarded ...)

2. And then, in accordance with the evaluation criteria so unfair exam results speak above a selected test today's most successful game! Then these exams as a final exam results today, and completely ignored other exam today. And this examination of examination papers and the success rate of overnight reporting to superiors.

3. superiors is a night owl, and enforce the law impartially people do not do the review. So he'll come tomorrow before, according to the success rate of test results submitted by the teacher today, to give the exam of examination papers to make a score . When the future to come up with this examination paper, see this play points, the exam will know how much the volume of gold friends.

4. The teacher did not dare to sleep, waiting for the night to the superior play of the exam scores. Once the fight to a higher level the score, the teacher quickly took the score and today's energy distribution schedule to develop tomorrow's energy distribution schedule .

4. how to develop it? Superior play score determines the size of the change in energy distribution schedule, if the superior to hit 0, it means not to change the schedule. The higher the score higher to play tomorrow's schedule will change greater. So how to change it? At this time, the teacher finally began to consider all students, the teacher will today Effort students achieve their goals of reducing the exam (such as today assigned 92 parts of energy in the body Xi small, small evening reached a goal, according to the higher scoring distribution of energy to be reduced by 20% tomorrow, so tomorrow small energy eve temporarily recorded as 92 * (1 - 0.2) = 73.6.), the energy distribution of the students did not reach the target of today's exam increases (such as today 2 parts partitioned rabbit energy body, then in accordance with the higher scoring, future energy distribution to increase by 20%, so the energy tomorrow rabbit temporarily referred to as a 2 * (1 + 0.2) = 2.4.).

4. Then are considered exhausted, to find tomorrow's energy and each student is not equal to 100, and then normalizing it to ensure that energy is the sum of 100.

5. So, tomorrow is a new day. . . In addition to energy distribution schedule changes, other did not affect the full process is repeated.

5. So, after many, many days. . .

6. ended when?

6. It is based on the higher scoring of each test day, to accumulate each student in the exam results of the previous day's friends (ie weighted exam results, scoring low for the higher examination, the examination results are less important; for higher high-scoring exam, exam results is very important)

6. If one day, the cumulative per student exam results found, eh? All students of the cumulative test results are all reached a goal! ! ! That is, after adding up and found that all students admitted to the school the goal! ! ! Well, as you graduate to mess ~

7. At this time, the students ran over a no exam objectives, called the Little good, she asked the teacher, "Teacher teacher, you say I will at Zhejiang University, Tsinghua or it?"

7. Teacher:. "Is very simple, you go to this pile of papers to do all over again, this is our past examination papers and then after you all done, I'll give you a higher level in accordance with previous score the gold content of each examination paper, you accumulate it, to get the final examination results. this final test results on behalf of the school of your future meeting. "

v2-b8749c02a1c08a600012ae0b57b393d7_b.png

Yes, the above process is AdaBoost algorithm machine learning / classifier. Including the training process and the Adaboost classification process.

Adaboost algorithm is a typical integrated machine learning, is a concrete realization Boosting thought. By training and combining many weak classifiers to classify weight determination result.

How the story above it turn into Adaboost algorithm? Complete the following concept to replace:

The following is a mapping algorithm entity (variable)

- Each student has a target -> a training sample x_train

- students without exam objectives -> to be classified samples x_test

- Tsinghua University, Zhejiang -> this task two categories c0, c1

- Daily energy distribution schedule -> each iteration of sample weight vector D

- selected daily highest success rate of examination papers -> each iteration produces weak classifiers

- Teachers calculate the success rate of each exam -> weighted error rate training set

- higher-level examination papers to each hit scores -> decision-making power of each weak classifier weight α

Number> weak classifiers - - the number of elapsed days

The following is a mapping algorithm processes (with each segment of the story corresponding to the front of the full sequence number)

Initialization> sample weight vector of D - 1. The first day of school for each student, the average allocation to energy -

- 2. Each day's teaching, Quiz, select the highest success rate of the examination process -> the current round of the iteration process of training the weak classifiers

- 3. superiors to examination papers scoring process -> calculate the current decision-making power of the weak classifier weight α

- 4. The teacher making tomorrow's energy distribution schedule -> D when the sample weight vector computing next iteration

- day by day 5. The last -> repeat steps 2-4 above.

- 6. All cumulative test results were all students to achieve their goals -> Adaboost model convergence to complete the training.

- 7. The goal did little to predict a good school -> using the trained Adaboost classifier predicted category to be classified samples.

I heard, the Adaboost write code, in comments to write out small evening this story will not be wrong ...

v2-b8749c02a1c08a600012ae0b57b393d7_b.png

Finally, the phone is with the student's teacher / front of the computer / IPAD / projector screen, do not imitate this article

( ̄∇ ̄)

More strange story, welcome to the micro-channel subscription number [Xi Yao small house] sell Meng play ~ (or color hardcover edition oh)

Published 33 original articles · won praise 0 · Views 3297

Guess you like

Origin blog.csdn.net/xixiaoyaoww/article/details/104553576
Recommended