# Do the rows of the design matrix refer to the observations or predictors?

I attempt to understand the formulation of dictionary learning for this paper:

Both papers used the exact formulation in two different domains.

Part 1: Clarification on math notations

Based on my understanding, in common machine learning, we formulate our matrices, from vectors, as rows to be observations, columns to be predictors.

Given a matrix, $$A$$:

         $$p_1$$ $$p_2$$ $$p_3$$ $$p_4$$ $$p_5$$ label
$$o_1$$      1     2     3     4     1     1
$$o_2$$      2     3     4     5     2     1
$$o_3$$      3     4     5     6     2     0
$$o_4$$      4     5     6     7     3     0


So using math notation and excluding label, I can define this matrix, $$A = [o_1, o_2, o_3, o_4] ∈ R^{4×5}$$, as $$A = [{(1, 2, 3, 4, 1), (2, 3, 4, 5, 2), (3, 4, 5, 6, 2), (4, 5, 6, 7, 3)}]$$, and in numpy:

import numpy as np

A = np.array([[1, 2, 3, 4, 1],
[2, 3, 4, 5, 2],
[3, 4, 5, 6, 2],
[4, 5, 6, 7, 3]])

A.shape
# (4, 5)


Am I right?