Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [matrix]

A matrix (plural matrices) is a rectangular array of numbers, symbols, or expressions arranged in rows and columns. The individual items in a matrix are called its elements or entries.

0
votes
0answers
17 views

Is it useful to add a proportion hyperparameter in the concatenation layer?

I'm reading a paper on deep learning-based recommender systems: Neural Collaborative Filtering. There are two sub-networks, GMF and MLP, which are fused into a unified model, by a concatenation layer. ...
0
votes
0answers
9 views

Dimensionality of similarity matrix

Below is a screen shot of a paper. The authors take a data-set $E\in R^{nxm}$. Here $n$ is the number of observations/samples/patients and $m$ is the number of genes/features. Preprocessing ...
0
votes
0answers
5 views

Eigengene K-means algorithm

Someone please explain the following in simple words especially focusing on: 1: The understanding of the "indicator vector". 2: Gram matrix. How X'X is the Gram matrix of samples and how $trace(X'...
1
vote
0answers
45 views

Markov Chains to Predict Weather States

This is my first question so I apologize if it is located in the wrong section or does not follow forum protocols. I am currently working on developing a transition matrix for predictions of weather ...
1
vote
0answers
8 views

understanding certain random recurrence relation with matrices [closed]

$x_{n+1}=a_{n+1}x_n+b_{n+1}, n=0,1,2,\dots, x_0\in \mathbb R, (a_n,b_n)$ be i.i.d and $E\{\log^{+}\|a_n\|\}<\infty,E\{\log^{+}\|b_n\|\}<\infty, x^{+}=x ;x>0, x^+=0; x<0 $, If the above ...
0
votes
0answers
20 views

R: Covariance matrix with Kronecker product

I use the Kronecker product for the fast generation of a big covariance matrix for two random vectors $X = (X_1,..., X_p)$ and $Y = (Y_1, ..., Y_k)$ based on a small covariance matrix applying to each ...
0
votes
0answers
6 views

Efficient way to do Autoencoder on large sparse matrix

I have a large csr_matrix of shape (60,000, 180,000) and about 99.7% sparsity. I was trying to train an autoencoder for this matrix via mini-batch optimization. I tried batch size of 6000 with ...
0
votes
1answer
22 views

Matrix Orthogonal to Vector: why take transpose?

In econometrics, we often have n observations (in a column vector $y$) which we want to explain with k$<$n regressors (the observations are in an nxk matrix $X$). In this case we use least squares ...
1
vote
0answers
17 views

Calculating heritability: pedigree information with family variation

currently I am aiming to calculate heritability, for which I would have to estimate additive genetic variance (the inverse of the relatedness matrix) for a first step. This is done with the following ...
1
vote
0answers
24 views

Testing for non-zero values above and below the diagonal of a matrix

I have a $n\times n$ contingency matrix comparing count data (classification) of two procedures. I want to test for non-zero values above and below the diagonal (different classifications in both ...
0
votes
0answers
11 views

Effect size on the difference between group differences (ΔA-B vs ΔA-C) using R

I am trying to calculate effect sizes, but all I can find on the web relates only to the effect size of the difference between two groups. What I am interested in, is the effect size of the difference ...
2
votes
0answers
103 views

Does anyone know the rank of the Netflix Prize dataset?

I'm looking into the Netflix Prize at the moment. We model the dataset as an $n \times m$ matrix, where $n$ is the number of users and $m$ is the number of movies. Does anyone know the rank of the ...
0
votes
0answers
25 views

performing function (maxcol) across the column

I'm currently going through this paper: Bidirectional Attention Flow for Machine Comprehension, Seo, Minjoon, et al. (2016) They perform a $max_{col}$ function over a matrix $S \in \mathbb R^{TxJ}$: ...
0
votes
0answers
37 views

Dot Product and Distance Matrix

If we want to calculate the squared distance between 2 vectors, $x$ and $y$, we use the dot product: $$||x-y||^2 = (x-y)(x-y)^T = xx^T - 2xy + yy^T$$ The question is, how to generalize this concept ...
1
vote
0answers
62 views

Hierarchical clustering dendrogram on a distance matrix

When computing hierarchical clustering over a data matrix, a dissimilarity matrix is first computed in order to build the tree (dendrogram). For example: ...
0
votes
0answers
7 views

Generic expression used to compute output feature value map

Is there a generic expression used to compute output feature value map given an mxm input feature map and an nxn filter? ...
4
votes
2answers
482 views

Inverse of the covariance matrix of a multivariate normal distribution

Is the covariance matrix of a multivariate normal distribution always invertible?
1
vote
0answers
39 views

Observed information matrix with multivariate normal distribution

$$ \DeclareMathOperator\tr{tr} \DeclareMathOperator\vecOP{vec} \newcommand\di{\mathrm{d}} \newcommand\D{\mathrm{D}} \newcommand\Hess{\mathrm{H}} $$ I do not have much experience with matrix ...
1
vote
1answer
27 views

Why do we use quadratic form for random vectors? [closed]

I am studying linear regression. I have studied this in the past, but this is my first time exposing myself to the matrix form of multiple linear regression. My matrix algebra/linear algebra skills ...
3
votes
1answer
60 views

Which is more numerically stable for OLS: pinv vs QR

If I am doing standard OLS and want to calculate beta values (OLS estimators), which of the following is the more numerically stable method? And why? Assuming that the columns of $X$ are already mean-...
0
votes
1answer
45 views

What is matrix norm in (Collins, 2001)

I am studying "A generalization of PCA to the exponential family" (Collins et al., 2001) and I don't understand some notations. What is the meaning of the matrix squared norm on page 6 ? Is it a ...
1
vote
1answer
24 views

QR decomposition computational efficiency

I am struggling to find a reference for this: In terms of big Oh notation does anyone know of any expressions for the computational time taken by commonly used algorithms for QR decompositions?
0
votes
0answers
15 views

Notation question for multiplying matrix rows by vector

I have a matrix A and row vector b such that; $A=\begin{bmatrix} a_{11} & a_{12} & a_{13} & \dots & a_{1n} \\ a_{21} & a_{22} & a_{23} & \dots & a_{2n} \\ ...
1
vote
0answers
121 views

What is the most intuitive proof that Gaussian kernel is positive definite?

I have general form of Gaussian kernel $K(x,x')=\exp(-\|x-x'\|^{2})$ (just not considering $\sigma$). I tried to prove its positive definiteness via Gram matrix properties, but couldn't. Is there any ...
3
votes
2answers
184 views

adding a small constant to the diagonals of a matrix to stabilize

I have a large correlation matrix (110x110) with some small eigenvalues (about 20 < 0.1). It has been suggested that adding a constant (about 0.1) to the diagonals will help to stabilize the matrix....
0
votes
0answers
19 views

Build customer ratings from subscription datetime data for a recommendation system

I want to build a recommendation system with only some customer's subscription and unsubscription date. I have a database that looks like: ...
0
votes
0answers
9 views

Measure the change of feature set over time

I have two matrices mat1 and mat2, the same number of columns but the different number of rows. You can imagine that ...
1
vote
0answers
31 views

Simplifying a covariance expression

Let $I=\begin{pmatrix}I_1\\\vdots\\ I_n \end{pmatrix}$ be a random vector, and $\Omega$ and $\Omega_I$ two random variables. I am trying to simplify the following equation (which worth $\frac{\rho_{I\...
4
votes
2answers
74 views

Steps of Matrix Multiplication

It may seem kind of silly, but can anyone please show me the intermediate steps implied by the second equality in this derivation? $$e^\prime e = \left(y - Xb\right)^\prime\left(y - Xb\right) = y^\...
3
votes
1answer
70 views

The form of the Log-Likelihood Function in Mixed Linear Models

Let us assume the following mixed effects model: $y = X\beta+Zu+e$ where $y$ is a vector of n observable random variables, $\beta$ is a vector of $p$ fixed effects, $X$ and $Z$ are known matrices, ...
0
votes
0answers
19 views

How to apply Lagrange Multiplier to a matrix?

I am learning about the Lagrange Multiplier and I see how to apply it to a set of equations but I don't know how to apply it to matrices. Suppose I have: ...
1
vote
1answer
27 views

Given $m$ $n$-dimensional vectors, how to create a vector perpendicular to all of them?

Given $m$ vectors, $x_1$, $x_2$, ... $x_m$ with all $x_i \,\, \epsilon \,\, \mathcal{R}^n$, $i=1,2... m$ and $m < n$. How to sample a vector $x_{m+1}$ perpendicular to all the vectors $x_1$, $...
3
votes
2answers
89 views

What is the Joint Density Function of a Three-Level Mixed-Effects Model?

This is a follow-up question to a question I posted earlier. Obviously, maximum-likelihood estimation of mixed-effects models requires the joint density function. Let us assume a two-level mixed ...
5
votes
1answer
156 views

Mixed Models: How to derive Henderson's mixed-model equations?

In the context of best linear unbiased predictors (BLUP), Henderson specified the mixed-model equations (see Henderson (1950): Estimation of Genetic Parameters. Annals of Mathematical Statistics, 21, ...
2
votes
1answer
72 views

Interpreting matrix notation to run MLE in R

I am trying to re-create some indicators from the World Bank, using the methodology described in this paper, and I need to do maximum likelihood estimation, preferably using R. The aim is to get an ...
7
votes
2answers
743 views

What is the problem with $p > n$?

I know that this is the solving system of linear equation problem. But my question is why it is a problem the number of observation is lower than the number of predictors how can that thing happen? ...
1
vote
0answers
55 views

Multilevel Modeling: Minimization Problem when A = B + TCT'

I currently study multilevel model using Leeuw & Meijer (2008) Handbook of multilevel analysis. On page 65, they state the following theorem: If $A = B + TCT'$ with $A$ and $B$ positive definite, ...
0
votes
0answers
30 views

Is there a problem with the “low-rank matrix approximation”?

I know that "rank" is the number or independent rows in the matrix and I know that the resulting matrix of the "low-rank matrix approximation" algorithm has lower rank than the original matrix. 1- But ...
0
votes
0answers
27 views

Writing the matrix form of a linear regression model?

I don't know how to write a simple linear regression model in a matrix form.. in our book we are given a table having values of $ x,y,x2,y2,xy.$ . I created a very small example and I attached it as ...
1
vote
0answers
40 views

Gaussian random fields: matrix and convolution sampling

I should be able to generate a stationary GRF from white noise in two different ways: multiplying the white noise vector by the square root of a covariance matrix with appropriate kernel; taking the ...
0
votes
0answers
20 views

Is there a relationship between the L2-norm and the Pearson chi-square test?

Suppose I have two datasets, $\mathbf{a}$ and $\mathbf{b}$, with some data weighting term (or error term), $\mathbf{e}$. I can compute the L2-norm for these two sets by the following: $$(\mathbf{a}-\...
1
vote
1answer
48 views

Why the representation in the form of $Z'X(X'X)^{-1}X'Z$ can not be simplified into $Z'Z$

Representation similar to $Z'X(X'X)^{-1}X'Z$ frequently appear to e.g. 2SLS. I think that $Z'X(X'X)^{-1}X'Z = Z'XX^{-1}X'^{-1}X'Z = Z'(XX^{-1})(X'^{-1}X')Z = Z'Z$. So why it seems that in the context ...
1
vote
0answers
37 views

VAR(p) Model Covariances and Moment Equation

I'm currently going through the book Analysis of Financial Time Series by Ruey S. Tsay and reached the following statement (The book can be found here, with VAR(1) included in the preview): Where: $...
0
votes
0answers
19 views

A question about the change in value of multiple correlation coefficient on multiplying each value with a variable quantity

Question: I know the formula of multiple correlation coefficient is; ( |R| is the correlation matrix and R11 is the cofactor of the (1,1)th element of R. But I really cannot figure out, how to deal ...
0
votes
1answer
29 views

Matrix Approach to Linear Regression Model

How do we interpret a data matrix, $X$ which does not have $1s$ as the first column? Does it refer to No Intercept Form? Could it also be interpreted as the mean deviated form? I understand that for ...
1
vote
0answers
28 views

How to simulate random correlation matrix containing off diagonal structures

I want to simulate a correlation matrix which has some off-diagonal structures and also should have some hierarchical structures. For simulating correlation matrices which contain hierarchical ...
1
vote
0answers
13 views

reorganise a data structure

I need to restructure my data, at the moment it looks like: Question number (39 total) in the header Participant ID | Response ( x 39 columns referring to Q numbers in the header) | Demographic x ...
2
votes
1answer
45 views

probability that matrix $2\times2$ of Random variables is Invertible

Let $X_1, X_2, X_3, X_4$ to be Variables, and let $A$ be the following matrix: $$ \left[\begin{matrix} X_1 & X_2\\ X_3 & X_4 \end{matrix}\right] $$ assume that $X_1, X_2, X_3, X_4$ are ...
0
votes
0answers
20 views

The miracle of the Lanczos/conjugate gradient algorithm

Lanczos/Arnoldi/Rietz/CG-like algorithm share the same core strategy... In each, a little miracle appears, most of the Gram-Schmidt inner products are zeroes ! In others words, new direction need only ...
1
vote
1answer
137 views

Measure of stability

I am working on a machine learning project when I realized I add a question. This is not programming, nor statistic, nor a probability question, but a real pure mathematical question. So I think my ...