A regression label is the numeric output a model is trained to predict. It is also called the target or target variable. Predictors, or features, are the input columns mapped to that output; locate the target before expanding the predictor set. section 2.3 section 4.2
In an Airbnb dataset, price is a regression label because it is continuous and positive. The same values can be transformed into a classification target by splitting at the mean or median, or by binning into deciles; then the output becomes a class or label rather than a raw numeric value. section 4.2 section 2.3
Prepare a regression label as part of an end-to-end tabular workflow:
- Keep the target out of the training features; using price as an input would reveal the answer being predicted. section 3.1.4
- Align the predictor table X and target series y on the same listing index after joining and reordering data. section 7.1.4
- Inspect its minimum, average, maximum, and percentiles for extreme values and skew before modeling. section 7.1.6
- If justified, filter both X and y with the same Boolean selection so retained rows remain aligned. section 7.1.6
Predicting mean listing price
A prepared Airbnb table uses listing attributes and engineered location features as X, while y is the mean-price column. Linear regression fits numeric feature weights to make predictions that approximate the target values; missing values, outliers, and weak linear relationships require attention. section 7.1.4 section 4.3.1
Listing 7.10 Plotting the target distribution
import matplotlib.pyplot as plt
import seaborn as sns
valid_y = y[valid_samples] #1
sns.kdeplot(valid_y, fill=True)
median = np.median(valid_y) #2
plt.axvline(median, color='r', linestyle='--', linewidth=2, label='Median')
plt.xlabel('Values')
plt.ylabel('Density')
plt.title('Distribution Curve with Median')
plt.legend()
plt.show()
Use the density plot to inspect the filtered target distribution and its median after selecting the central range of values. section 7.1.6



















