I tried fitting the exponential function and logistics function to the number of COVID-19 positive patients in Tokyo

background

Someone has fitted the global COVID-19 infection trend to exponential and logistics functions and calculated the doubling period (https://github.com/aatishb/covid), so clone it. I applied it to the data on the number of patients published by the Tokyo Metropolitan Government.

The reason for Tokyo is that if it is nationwide data, the difference in circumstances depending on the region will be mixed into one distribution, so it is easier to apply it to the ideal model of infection explosion in a limited area. .. It is also the region with the highest risk in Japan.

The analysis method and precautions are written in the Notebook.

result

Notebook is here: https://github.com/msakuta/covid/blob/master/curvefit-tokyo.ipynb

** Based on Most Recent Week of Data **

	Confirmed cases on 2020-04-02 00:00:00 	 587.0
	Confirmed cases on 2020-03-26 00:00:00 	 212.0
	Ratio: 2.77
	Weekly increase: 176.9 %
	Daily increase: 15.7 % per day
	Doubling Time (represents recent growth): 4.8 days

** Based on Logistic Fit**

	R^2: 0.9753797360404987
	Doubling Time (during middle of growth):  12.02 (± nan ) days

** Based on Exponential Fit **

	R^2: 0.975379736914424
	Doubling Time (represents overall growth):  6.01 (± 0.38 ) days

image.png

Of note is the value of R ^ 2, which exceeds 0.97 for both the exponential and logistics functions, and can be seen as following a typical explosive growth trajectory.

Based on the number of cases in the most recent week, the doubling period is 4.8 days, the logistics function is 12.02 days (at the maximum gradient point), and the exponential function is 6.01.

When extrapolated

Extrapolating the exponential function is generally not a good idea, but if exponential growth continues, it will be around 20,000 in 30 days.

image.png

Of course, it is not easy to conclude that this will happen. The city has also issued a request to refrain from going out, and people's perceptions have changed significantly in the last few weeks. I think there is a good chance that it will converge quickly. However, looking at this graph, I have to think that it is quite a Noh weather to say "I'm just barely stepping on".

The scary thing about COVID-19 is that it has an unaware incubation period during which it may be spreading the virus. According to the Japanese Society of Infectious Diseases (https://www.kansensho.or.jp/ref/d77.html), this incubation period is 1 to 14 days, but it is the longest from taking measures to the effect. It means that there is a delay of about two weeks. Personally, I think it's too late to declare an emergency now.

In addition, the number of tests in Japan is considerably smaller than in foreign countries, so it is unknown how many undetected infected people are lurking.

What's even more difficult is that things change drastically every week, so I think there are some areas where ordinary people's senses aren't catching up. But even in Tokyo, a month later, like New York, the bodies overflowing from the hospital may be stored in the refrigerator.

Fortunately, the number of infected people is updated daily, so I would like to keep an eye on trends as much as possible.

reference

Although introduced by the original author of Notebook, the following video is highly recommended.

https://www.youtube.com/watch?v=Kas0tIxDvrg

https://www.youtube.com/watch?v=54XLXg4fYsc&t=1s

Recommended Posts

I tried fitting the exponential function and logistics function to the number of COVID-19 positive patients in Tokyo
I want to get the file name, line number, and function name in Python 3.4
I drew a Python graph using public data on the number of patients positive for the new coronavirus (COVID-19) in Tokyo + with a link to the national version of practice data
[Linux] I learned LPIC lv1 in 10 days and tried to understand the mechanism of Linux.
I tried to illustrate the time and time in C language
I tried to implement the mail sending function in Python
I tried to fight the Local Minimum of Goldstein-Price Function
I tried to tabulate the number of deaths per capita of COVID-19 (new coronavirus) by country
I tried to get the number of days of the month holidays (Saturdays, Sundays, and holidays) with python
I tried to visualize the age group and rate distribution of Atcoder
(Python) I tried to analyze 1 million hands ~ I tried to estimate the number of AA ~
I tried to extract and illustrate the stage of the story using COTOHA
I tried to verify and analyze the acceleration of Python by Cython
I tried to display the altitude value of DTM in a graph
I implemented the VGG16 model in Keras and tried to identify CIFAR10
Create a bot that posts the number of people positive for the new coronavirus in Tokyo to Slack
I tried the pivot table function of pandas
I tried to touch the API of ebay
I tried to correct the keystone of the image
I tried to predict the price of ETF
I tried to vectorize the lyrics of Hinatazaka46!
I tried to notify the update of "Hamelin" using "Beautiful Soup" and "IFTTT"
I tried to predict the number of people infected with coronavirus in Japan by the method of the latest paper in China
I tried to predict the number of people infected with coronavirus in consideration of the effect of refraining from going out
I tried to learn the sin function with chainer
python beginners tried to predict the number of criminals
How to get the number of digits in Python
I tried to notify the update of "Become a novelist" using "IFTTT" and "Become a novelist API"
I tried to publish GraphQL API of COVID19 infected person situation in Hyogo prefecture.
I tried to summarize the basic form of GPLVM
I tried to automate the article update of Livedoor blog with Python and selenium.
I tried to approximate the sin function using chainer
I tried to visualize the spacha information of VTuber
I tried to erase the negative part of Meros
I tried to compare the processing speed with dplyr of R and pandas of Python
I tried to classify the voices of voice actors
I tried to summarize the string operations of Python
I tried to automatically post to ChatWork at the time of deployment with fabric and ChatWork Api
I tried to publish GraphQL API of COVID 19 infected person situation in Hyogo prefecture. (Part 2)
[For beginners] I want to explain the number of learning times in an easy-to-understand manner.
I tried to verify the yin and yang classification of Hololive members by machine learning
I tried to create a Python script to get the value of a cell in Microsoft Excel
I tried to put HULFT IoT (Edge Streaming) in the gateway Rooster of Sun Electronics
[Natural language processing] I tried to visualize the remarks of each member in the Slack community
I tried to find the entropy of the image with python
Try scraping the data of COVID-19 in Tokyo with Python
[Horse Racing] I tried to quantify the strength of racehorses
How to find the optimal number of clusters in k-means
I tried to get the location information of Odakyu Bus
I tried the accuracy of three Stirling's approximations in python
I tried to find the average of the sequence with TensorFlow
Analyzing data on the number of corona patients in Japan
I tried to summarize the code often used in Pandas
I tried programming the chi-square test in Python and Java.
I tried to display the time and today's weather w
[Introduction to infectious disease model] I tried fitting and playing ♬
[Python] I tried to visualize the follow relationship of Twitter
I tried to summarize the commands often used in business
I tried a little bit of the behavior of the zip function
[Machine learning] I tried to summarize the theory of Adaboost
I want to know the features of Python and pip