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

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.

主站蜘蛛池模板: 德清县| 黄龙县| 楚雄市| 秦皇岛市| 宁河县| 宝应县| 江永县| 南陵县| 湖州市| 左权县| 双城市| 类乌齐县| 江川县| 文登市| 读书| 南汇区| 拉萨市| 崇礼县| 兴海县| 辰溪县| 通河县| 疏勒县| 清远市| 招远市| 建始县| 奎屯市| 双牌县| 普兰店市| 怀化市| 内江市| 屯门区| 玛纳斯县| 桓台县| 天镇县| 莱西市| 安塞县| 兴和县| 高陵县| 青川县| 绥宁县| 镇平县|