1

Does the following notation makes sense if I have several matrices $X_i$ and I augment each of them with element-wise operations ?

$X_i \leftarrow (X_i \ \vert \ X_i^2 \ \vert \ \log(X_i + 1) \ \vert \ (1 + \log X_i)^{-1} \ \vert 1 )$

The last term '1' is actually a vector not matrix. The following operation would thus bring each matrix from $(N \times M_i)$ to $(N \times (4M_i + 1))$ assuming they all have the same number of rows.

Kong
  • 884
  • I think this does make sense. It's nonstandard notation, but a variant on something recognizable. So define it carefully and then use it in your document. – Ethan Bolker Oct 25 '17 at 12:14

1 Answers1

2

I may well be reading you wrong, but this is my interpretation. $${\bf X}_i \gets \begin{bmatrix} {\bf X}_i, & {\bf X}_i^2, & \log({\bf X}_i + {\bf I}), & ({\bf I} + \log {\bf X}_i)^{-1}, & {\bf 1} \end{bmatrix}$$ If this is the right interpretation, then many will understand and accept this. I am not sure how to understand $\log$ of a matrix which is not square, though.

EDIT: Since the operations are componentwise, I think it safer to do this $${\bf X} \gets \begin{bmatrix} {\bf X}, & {\bf A}, & {\bf B}, & {\bf C}, & {\bf d} \end{bmatrix},$$ where $$ a_{ij} = x_{ij}^2, \quad b_{ij} = \log(1 + x_{ij}), \quad c_{ij} = b_{ij}^{-1}, \quad d_i = 1.$$ If an index is absolutely necessary for the matrix ${\bf X}$, then let it be a superscipt, i.e. ${\bf X}^{(k)}$ and $x_{ij}^{(k)}$.

There is a group of people who will accept MATLAB notation in algorithms, but better safe than sorry.

Carl Christian
  • 12,583
  • 1
  • 14
  • 37
  • Thank you for the suggestion. the square, log, and inverse functions are actually elementwise operations. For example, the third matrix would be done as follows: Add 1 to each element in X then take the logarithm of each element. – Kong Oct 25 '17 at 15:02
  • @Kong I must have been napping. You did indeed write that the operations where componentwise. – Carl Christian Oct 25 '17 at 15:52
  • Thanks ! So does that mean that the notation I have is correct ? I dont think I should use the identity matrix. – Kong Oct 25 '17 at 15:58
  • The only problem with your notation is that some people (like me) will be napping and not catch the fact that the operations are done componentwise. With the edit they are forced to realize that you 1) augment the matrix $X$ with other matrices, and 2) how these matrices are defined. It can be tempting to be clever, but it is better to be understood. – Carl Christian Oct 25 '17 at 17:13
  • Thank you very much ! The notations you provide are very clear and I will follow it ! I do have several matrices though but I will state that instead of using notations to denote each matrix – Kong Oct 25 '17 at 18:51