BIZNIQUE / LINEAR ALGEBRA / 02
Represent data as vectors and matrices
Represent data as vectors and matrices
Decide what a row, a column and a missing value mean before choosing an algorithm.
BIZNIQUE / LINEAR ALGEBRA / 02
Decide what a row, a column and a missing value mean before choosing an algorithm.
THE IDEA
In this example, each row is one observation and each column is one numerical feature. Multiplying by a weight vector produces one score per row. Changing a weight affects every row through that feature.
Xw = predictions
A category code is not automatically a quantity. Keep missing values distinct from measured zeros, and preserve the feature order used during training.
TRY IT YOURSELF
For the row (1, 2, 3) and weights (1, 0, −1), compute the score.
The score is −2: 1×1 + 2×0 + 3×(−1).
CONTINUE EXPLORING