Understanding the advertising data

This problem falls into the supervised learning type, in which we have explanatory features (input variables) and the response (output variable).

What are the features/input variables?

  • TV: Advertising dollars spent on TV for a single product in a given market (in thousands of dollars)
  • Radio: Advertising dollars spent on radio
  • Newspaper: Advertising dollars spent on newspapers

What is the response/outcome/output variable?

  • Sales: The sales of a single product in a given market (in thousands of widgets)

We can also use the DataFrame method shape to know the number of samples/observations in our data:

# print the shape of the DataFrame
advertising_data.shape
Output:
(200, 4)

So, there are 200 observations in the advertising data.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset