Questions tagged [tensor]
In machine learning, tensor is a multidimensional (multi-index, or multi-way) array of numbers, i.e. a generalization of a matrix.
73 questions
1
vote
0
answers
45
views
Best way to present vectors/tensors with correlated elements
When analysing a molecular dynamics simulation, I get a tensor (3x3 matrix) at each timestep -- this is generally a function of the individual atomic positions in the simulation, $\mathbf{T}_i=f(\...
4
votes
1
answer
314
views
Quantile gam (qgam) of tensor product using gratia: drawing a contour plot of the response rather than the partial effect
Let's imagine the quantile regression (qgam) of the tensor product below.
...
3
votes
2
answers
112
views
Solve Least Square Problem of a Sum of $N$ Quadratic Forms with a Positive Vector
Suppose we are given a list of $N$ positive definite quadratic forms $X^TQ_k X$ (where $k\in[1,N]$ and
$Q_k\in\mathbb{R}^{p\times p}$ $\forall k$), and a positive vector $V$ of same length $N$ i.e. $V=...
1
vote
0
answers
57
views
INDSCAL as a special case of CANDELINC
Here is my attempt to show that INDSCAL as a special case of CANDELINC. I am using the following paper as my reference for definitions.
Kolda, Tamara G., and Brett W. Bader. "Tensor ...
1
vote
0
answers
46
views
How to implement and notate the replication/transformation of a 2D matrix to a 3D tensor and the summation/transformation of a 3D tensor to 2D matrix?
Background:
I have a model with a dimension $T$ representing $time$, a dimension $N$ representing $technologies$ and a dimension $P$ representing $prices$. During calculations in this model, I would ...
1
vote
1
answer
89
views
te(x, by = factor) or s(x, by = factor)?
I'm trying to wrap my head around/put into words the meaning of an isotropic or anisotropic relation in the case of a linear term by factors (technical replicates). Would the use of s(x, by = factor) ...
1
vote
0
answers
61
views
How to leverage the separable functions in MCMC sampling? [closed]
I'm considering the posterior of a parametric model via the Bayesian approach. More specificity, I have a parametric model $u(p_1,p_2, p_3) = u_1(p_1) \times u_2(p_2) \times u_3(p_3)$ and I want to ...
0
votes
1
answer
141
views
Is the design matrix in a panel regression model a tensor?
In a panel regression model of the form
$$Y_{it} = \mathbf{X}_{it} \pmb{\beta} + \epsilon_{it}$$
where
$Y_{it}$ is the dependent variable for unit $i$ at time $t$
$\mathbf{X}_{it}$ is a vector of $K$ ...
2
votes
0
answers
35
views
Is spiked tensor decomposition a special case of INDSCAL decomposition?
I understand that "Spiked" often refers to the presence of a dominant component (or a few dominant components) in a tensor decomposition. Spiked tensor decomposition is applied to multi-way ...
1
vote
1
answer
454
views
Transformers: Cross Attention Tensor Shapes During Inference Mode
Using the "classic" transformer model describing in "Attention is All You Need", I'm struggling to understand how the Encoder output is used by the Decoder during cross attention ...
0
votes
0
answers
95
views
How do continuous partial derivatives depend on $n$ in maximum likelihood estimation?
I'm reading Tensor Methods in Statistics by McCullagh 1987, (P209 for this question) and I can't understand one step he uses.
He begins with the usual log-likelihood
\begin{equation*}
l(\theta; Y) =...
3
votes
1
answer
573
views
Difference between multi-head and single-head attention
Attention, as long as gradient calculations care, is two nested tensor multiplications and a softmax. I thought that, then, multi-head attention with $h=8$ and $d_k=64$ results in the same tensor with ...
3
votes
1
answer
1k
views
mgcv: Use of s() or te() with interactions in GAMs?
I am trying to model CO2 fluxes (fco2) using a number of environmental parameters using a GAM in mgcv.
Specifically, I have leaf temperature (tl), vapour pressure deficit (vpd), and soil water content ...
2
votes
2
answers
219
views
Constaint on te() tensor product gam mgcv
In the mgcv package in R, I'm working on models whose covariates are forced to change shape at the median (=0). These are the models:
...
1
vote
0
answers
49
views
Better default prior for non-negative canonical polyadic decomposition of counts than Exp(1)?
Suppose I have a instance of a random $k$-mode tensor $X_{n_1 \times \ldots \times n_k}$ of count data. I would like to perform non-negative canonical polyadic decomposition of this tensor using ...