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

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.

主站蜘蛛池模板: 庄河市| 城市| 旬阳县| 莎车县| 磐石市| 龙井市| 禄丰县| 三原县| 化隆| 永兴县| 泰和县| 仁化县| 兴业县| 斗六市| 讷河市| 田东县| 桑日县| 砚山县| 达日县| 镶黄旗| 建湖县| 横峰县| 镇康县| 临西县| 丹东市| 左云县| 枣强县| 宁蒗| 杨浦区| 贺州市| 乳山市| 花莲县| 黔东| 新平| 凤台县| 积石山| 新乡县| 奈曼旗| 黄骅市| 犍为县| 咸丰县|