官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 虞城县| 怀宁县| 资阳市| 辽宁省| 临江市| 栾城县| 门头沟区| 青铜峡市| 潼关县| 梓潼县| 河源市| 乐安县| 唐河县| 阳城县| 荔浦县| 淳安县| 镇巴县| 岢岚县| 溧阳市| 德安县| 隆昌县| 雅安市| 常州市| 多伦县| 古田县| 金坛市| 高邑县| 武邑县| 迁安市| 铜川市| 福安市| 上犹县| 平度市| 广灵县| 额敏县| 北海市| 邹平县| 宁明县| 新安县| 玉龙| 云龙县|