第3章回帰のための線形ニューラルネットワーク
3.1. Linear Regression3.1 線形回帰
Regression problems pop up whenever we want to predict a numerical value. Common examples include predicting prices (of homes, stocks, etc.), predicting the length of stay (for patients in the hospital), forecasting demand (for retail sales), among numerous others. Not every prediction problem is one of classical regression. Later on, we will introduce classification problems, where the goal is to predict membership among a set of categories.
英語のヒント
回帰問題は、数値を予測したいときにはいつでも顔を出す。よくある例には、(住宅、株などの)価格の予測、(病院の患者の)在院日数の予測、(小売の売上の)需要予測など、ほかにも数え切れないほどある。すべての予測問題が古典的な回帰であるわけではない。後で、カテゴリーの集合のどれに属するかを予測することを目標とする分類問題を紹介する。
As a running example, suppose that we wish to estimate the prices of houses (in dollars) based on their area (in square feet) and age (in years). To develop a model for predicting house prices, we need to get our hands on data, including the sales price, area, and age for each home. In the terminology of machine learning, the dataset is called a training dataset or training set, and each row (containing the data corresponding to one sale) is called an example (or data point, instance, sample). The thing we are trying to predict (price) is called a label (or target). The variables (age and area) upon which the predictions are based are called features (or covariates).
英語のヒント
話の筋を通す例として、家の面積(平方フィート)と築年数(年)にもとづいて、家の価格(ドル)を推定したいとしよう。住宅価格を予測するモデルを作るには、家ごとの販売価格、面積、築年数を含むデータを手に入れる必要がある。機械学習の用語では、このデータセットを訓練データセットまたは訓練集合といい、各行(1件の販売に対応するデータを含む)を事例(またはデータ点、インスタンス、サンプル)という。予測しようとしているもの(価格)をラベル(または目標値)という。予測のもとになる変数(築年数と面積)を特徴量(または共変量)という。
%matplotlib inline
import math
import time
import numpy as np
import torch
from d2l import torch as d2l