0
$\begingroup$

Suppose I have a grid 12x12 of pixels that can be only black or white. I can't understand if the dimensionality is 2 or 3. I mean... Is dimension given by 12x12 or 12x12x2 ?

$\endgroup$
0
$\begingroup$

There is some ambiguity in dimensionality you ask for. The vector space that your input lies in is $12\times12 = 144$ dimensional. So, if you're going to apply some kind of dimensionality reduction algorithm, e.g. PCA, this is the dimension. But, we sometimes tend to refer to dimension as the shape of the tensor, which is $2$ in this case. Some libraries might read the image into $12\times12\times3$ tensors, in which the third entry indicates RGB decomposition, even if the image is black and white. In this case, the tensor dimension is $3$.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Yes, I want to apply a dimensionality reduction but also in this case I don't understand why the dimensionality is 12x12 and not 12x12x2 (no rgb, just black or white). $\endgroup$ – Ric Jan 15 '19 at 10:44
  • $\begingroup$ Where does that 2 come from? Is it the number of possible choices for a given pixel? $\endgroup$ – gunes Jan 15 '19 at 10:45
  • $\begingroup$ Yes, supposing that we are talking about rgb pixels the dimensionality could be 12x12x3... or not? $\endgroup$ – Ric Jan 15 '19 at 10:47
  • $\begingroup$ Definitely not. {0,1} is your domain, it has nothing to do with dimensionality. In RGB, your domain would be binary numbers with 24-bits, i.e. $2^{24}$ possible values. For dimensionality, you'll consider how many variables you have, not their values. In this case, you have $144$, i.e. $x_{1,1},x_{1,2},...x_{12,11},x_{12,12}$ $\endgroup$ – gunes Jan 15 '19 at 10:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.