Glossary term
Glossary term
Foundations
The array of feature values comprising an example. The feature vector is input during training and during inference. For example, the feature vector for a model with two discrete features might be:
[0.92, 0.56]
![[0.92, 0.56]](https://yuluzuxfjckzdqjzjcrv.supabase.co/storage/v1/object/public/glossary-media/machine-learning-terms/feature-vector/b7e5e54a18985e09.png)
Each example supplies different values for the feature vector, so the feature vector for the next example could be something like:
[0.73, 0.49]
Feature engineering determines how to represent features in the feature vector. For example, a binary categorical feature with five possible values might be represented with one-hot encoding. In this case, the portion of the feature vector for a particular example would consist of four zeroes and a single 1.0 in the third position, as follows:
[0.0, 0.0, 1.0, 0.0, 0.0]
As another example, suppose your model consists of three features:
a binary categorical feature with five possible values represented with one-hot encoding; for example: [0.0, 1.0, 0.0, 0.0, 0.0]
another binary categorical feature with three possible values represented with one-hot encoding; for example: [0.0, 0.0, 1.0]
a floating-point feature; for example: 8.3.
In this case, the feature vector for each example would be represented by nine values. Given the example values in the preceding list, the feature vector would be:
0.0
1.0
0.0
0.0
0.0
0.0
0.0
1.0
8.3
See Numerical data: How a model ingests data using feature vectors in Machine Learning Crash Course for more information.
Created for this library
A retail recommendation team builds a feature vector per user combining demographic, behavioral, and embedding features for its ranker.
A credit team produces one feature vector per application that flows through preprocessing, scoring, and explanation in production.
A search-quality team produces feature vectors per query-document pair, combining textual and behavioral features for ranking.
Definition source: Google for Developers Machine Learning Glossary | Creative Commons Attribution 4.0 License