A feature is an input variable—a clue supplied to a model to help make a prediction. The value being predicted is the label: for price prediction, features provide clues and price is the answer. section 4.5.1
Features can take different forms:
- For drug-price prediction, examples include dosage, salt name, and manufacturer. section 4.5.1
- For risk classification, medicine descriptions and side effects are combined into one text feature. section 4.6.3
In supervised learning, feature columns form X and labels form y; their rows must stay aligned. A trained model receives test-set features to predict labels, which are compared with the held-out actual values. section 4.5.1 section 4.5.3
Table 4.3 Difference between X and Y datasets
|
Term
|
Traditional Name
|
Math Symbol
|
Shape
|
Description
|
|
Features
|
Independent Variables
|
X
|
Matrix (N rows * M columns)
|
The "clues" (Dosage, Salt Name, etc.)
|
|
Label
|
Dependent Variable
|
y
|
Vector (N rows * 1 column)
|
The "answer" you want (Price)
|
Compare the feature matrix X with the label vector y. section 4.5.1













