Home » Python » python – question about time series prediction by age-Exceptionshub

python – question about time series prediction by age-Exceptionshub

Posted by: admin February 24, 2020 Leave a comment

Questions:

I recently collected a school attendance data by grade from 2010 – 2020. the data format is like this:

year | grade | new_students_this_year | students_drop_out | total

2010 |   1   | 20                     |      5               |  20
2010 |   2   | 30                     |      7               |  30
2010 |   3   | 40                     |      0               |  40
2010 |   4   | 50                     |      3               |  50
......
2011 |   1   | 10                     |      0               |  50
2011 |   2   | 21                     |      5               |  20(2010's grade 1 student)+10(new)-5(grade 1's drop)
......
2020 |   1   | 130                     |      6               |  ...
2020 |   2   | 160                     |      9               |  same logic
......

What model should I use if I were to predict new_students_this_year, students_drop_out_this_year, and total? Looks like I have to use something to learn the underlying distribution, if any. Any suggestions are welcome.

How to&Answers:

use forecast package may work well based on your request. Depending on the historical trend, you can select models that produces the best result.