Question
The first DataFrame must be called features, which is your feature matrix. The features DataFrame must contain the following feature columns in this exact order:
The first DataFrame must be called features, which is your feature matrix. The features DataFrame must contain the following feature columns in this exact order: days_cube, days_sq, days, temp, pop_dense_sq, pop_dense, pop. These features correspond to the features present in the equation above.
● days_cube and days_sq are the cubed and squared values of days, respectively.
● days is the number of days since the outbreak began in the respective capital city, which always begins with zero and adds 1 day for each row of recorded data for each capital city. There are 27 capital cities in Brazil. Each capital city has 151 days of recorded data.
● pop_dense_sq is the squared value of pop_dense
● pop is the city population
● Population density is defined as the population of a city divided by the area in kilometers squared of the city.
The second DataFrame contains target values and must be called a response, which is the accumulated case counts column for the capital cities.
Your task is to construct these two Pandas DataFrames using the data provided.
(source file: https://github.com/jenhernandez2099/BrazilCOVIDData)
In this work, the authors considered a model similar to the following: log(yit) = 0 + 0x - 0x 1 + 03Xit + 04T + 05d? +06d + 07 + Eit where Element Description Vit Xit Ti di ei Eit The daily cumulative COVID-19 count in capital city i on day t The number of days since the outbreak began in capital city i on day t The average annual temperature for capital city i The population density of city i The population of city i Random Gaussian noise (Ignored when training a regression model)
Step by Step Solution
3.47 Rating (157 Votes )
There are 3 Steps involved in it
Step: 1
I tried hard to find the data set but it was of no avail Therefore I have created a dummy ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started