Questions tagged [matrix]

A matrix is a collection of numbers arranged into a fixed number of rows and columns.

Filter by
Sorted by
Tagged with
1 vote
1 answer
23 views

What are the general rules or principles for finding matrix operations that are used as filters in convolutional neural networks?

Is there a set of rules or guidelines for designing filters for convolutional neural networks? For example, a 3 x 3 layer with ones in the first column, zeroes in the second, and negative ones in the ...
Joachim Rives's user avatar
0 votes
0 answers
33 views

What is numpy.dot(a, b)[i,j,k,m] = sum(a[i,j,:] * b[k,:,m]) in numpy.dot() documentation?

I was trying to understand difference between np.dot and np.matmul and in the docs of np.dot() there is this code dot(a, b)[i,j,k,m] = sum(a[i,j,:] * b[k,:,m]). ...
Tinted's user avatar
  • 1
0 votes
0 answers
15 views

How do I reconstruct irregularly spaced lat-lon data (in the form of a matrix) using spherical harmonic fitting?

Introductory Links to spherical harmonics give a mildly rigorous introduction to the concept; but very few links describe how to actually use them. I have latitude-longitude data arranged the ...
requiemman's user avatar
0 votes
1 answer
124 views

Flattening before Fully-connected Layer (DENSE)

Can anyone explain why we need to flatten the data before inputting it into a fully-connected layer? What will happen if we input a matrix of size (m,n) into a fully-connected layer that has k ...
Nhan Nguyen's user avatar
0 votes
0 answers
639 views

Using pyspark to create a large precomputed cosine similarity matrix from text data

I would like to precompute a cosine similarity matrix for a large dataset (upwards of 5 million rows) using pyspark. Here's what I have so far. libraries: ...
cfrench's user avatar
0 votes
0 answers
17 views

Averaging subregion correlation coefficients into a single measure

I've got a 257x257 correlation matrix of functional connectivity (fMRI) data. It is a symmetric matrix where each value is the Pearsons correlation of the brain area in the row with the brain area in ...
chainhomelow's user avatar
-1 votes
1 answer
41 views

Determining "filters" dimension after a convolution operation

I tried to calculate the "filtered" dimension and I seem to be getting it wrong. Below there is the image I am trying to calculate the "filtered" dimension for, where you have 192 ...
Mah Neh's user avatar
0 votes
0 answers
10 views

Rotate vector anticlockwise

I'm learning mathematics for Machine Learning, and there given a vector [ 1 0 ] and [ 0 1 ]. The vector is packed on a matrix, ...
Rickyslash's user avatar
0 votes
0 answers
18 views

How to derive expression for gradient in BPPT

I have the following problem: I am trying to derive final expressions for error gradients in a simple recurrent neural network (Backpropagation through Time, BPPT). The parameters and state update ...
doktormatte's user avatar
1 vote
1 answer
289 views

Is it possible to reverse the layers of a convolutional neural network?

From my understanding typically a convolutional neural network has a matrix (e.g. an image) as input and output is either an integer or a vector of integers in regression and in classification a ...
sayuri's user avatar
  • 11
0 votes
0 answers
12 views

Find transistion matrix Markov chain

There is a two-state discrete-time Markov chain with a random variable: $y_t = yx_t$ where $y = [1 \ 5]'$ (' is there because this matrix should be transposed). It is known that: $E(y_{t+1} | x_t) = [...
Ирина Мухомор's user avatar
1 vote
0 answers
18 views

Implementing eigen decomposition

Question Please help understand why the eigen vectors do not match below. If there are misunderstandings or incorrect place, please correct too. It would be much appreciated. Eigen decomposition ...
mon's user avatar
  • 585
0 votes
1 answer
30 views

Journals to publish a proof of a math result used for neural-network algorithms

I would like to know which journal is an appropriate outlet for the results described below. I recently came across a particular neural-network training algorithm. The algorithm is based on a result ...
Pierre's user avatar
  • 1
1 vote
1 answer
816 views

How many matrix combinations is this? [closed]

Input Matrix: A B C D E A 1 - - - - B - 1 - - - C - - 1 - - D - - - 1 - E - - - - 1 ...
Roel Van de Paar's user avatar
1 vote
1 answer
49 views

Plot a matrix as a single point in space

I have a dataset of drugs represented as a graph, each of which is described by three non-square matrices: edge index (A), an 2xe matrix, where e are the bonds of the molecule, the first line ...
Gianmarco Luchetti 's user avatar
0 votes
1 answer
168 views

How to calculate the distance matrix when there is a lot of data And the memory does not support it

I am dealing with a data matrix in which most of the variables are binary or multilevel response. I would like to perform the MDS algorithm and for that, I need to calculate the distance matrix first. ...
PicaR's user avatar
  • 304
0 votes
1 answer
55 views

Back propagation matrix shape error using Python

I wanna implement the back-propagation algorithm in python with the next code ...
Al.Vioky's user avatar
0 votes
1 answer
70 views

Converting images in a directory into a vector to calculate cosine distances?

I'm currently going through issues in terms of acquiring multiple images at once to convert them to a vector for calculating the cosine distance to get similarity between say an image from the ...
Is land's user avatar
  • 11
0 votes
1 answer
56 views

Beginner Question on Understanding Linear Classifier

I have been trying to understand the math behind Linear classifier for images and I'm hitting a roadblock to understanding this image below: I can to some extent agree that we stretch the pixels into ...
joesan's user avatar
  • 137
1 vote
1 answer
96 views

memory error- python N-th order Markovian transition matrix from a given sequence

Ok. What is wrong with you code! I am trying to calculate transition probabilities for each leg. The code works for small array but for the actual dataset I got memory error. I have 64 g version ...
Dr. Turkuaz's user avatar
1 vote
0 answers
57 views

How to compute backpropagation gradient according chain rule for using vector/matrix differential?

I have some problems for computing derivative for sum of squares error in backprop neural network. For example, we have a neural network as in picture. For drawing simplicity, i've dropped the sample ...
Grigogiy Reznichenko's user avatar
0 votes
1 answer
194 views

Build autoencoder for single matrix with integer numbers

Can you please tell me how to build an autoencoder with a single matrix(4,4) with integer numbers? I want to build an autoencoder for the below-mentioned data. I don't know whether I should convert ...
aadil gani's user avatar
0 votes
1 answer
47 views

Block matrix indexing

Hello this might be a stupid question but i need some help indexing a Matlab matrix consisting of several sub-matrices. ...
Frank Ch's user avatar
5 votes
0 answers
82 views

How is image convolution actually implemented in deep learning libraries using simple linear algebra?

As a clarifier, I want to implement cross-correlation, but the machine learning literature keeps referring to it as convolution so I will stick with it. I am trying to implement image convolution ...
Jozef Nagy's user avatar
0 votes
4 answers
1k views

Creating & handling large matrices in python? [closed]

I need to create a large matrix of size 400,000*400,000 and do some transformation on it. I am not able to do it using python in my laptop due to memory constraints. What technologies I can use to ...
user16584277's user avatar
0 votes
1 answer
24 views

ML for data processing. What are the options?

Currently I am working on improving a stage on a data processing pipeline. The source data has a large number of fields and is getting normalized into a simpler entity. This entails that in many cases ...
fstab's user avatar
  • 101
0 votes
0 answers
127 views

Inverting a matrix using a convolutional neural network

Just for a fun exercise, I am trying to invert a matrix, say size 28x28 (or even 5x5) with a neural network. The way I approached this (quite naively) is as follows: I built a fully convolutional ...
Ashesh's user avatar
  • 90
0 votes
2 answers
78 views

Attention transformation - matrices

Could somebody explain which matrix dimension should be found here - K? and if it is for example 3X3, should I use just 9?
Adolf Miszka's user avatar
1 vote
0 answers
38 views

Efficient method of performing within matrix similarity

I want to compute a similarity comparison for each entry in a dataset to every other entry that is labeled as class 1 (excluding the current entry if it has a label of 1). So, consider a matrix of ...
CopyOfA's user avatar
  • 167
0 votes
0 answers
18 views

Reducing dataset before computing similarity matrix

I'm writing my thesis and am trying to calculate a similarity matrix of houses. I currently have a dataset of 500,000 houses that I need to calculate the similarity between. I.e. I need to calculate ...
Max van der Werf's user avatar
0 votes
1 answer
26 views

Efficient way to create matrix that shows if data exits per day [closed]

So I have a dataset containing different ID's and the time the data was created. ...
YannickAaron's user avatar
1 vote
3 answers
111 views

converting array to a true/false matrices

I have a data set where each record is a json document with a label, and an array of signals. The signals will vary for each record: ...
Cyph's user avatar
  • 111
1 vote
1 answer
616 views

PCA, covariance, eigenvector matrix and rotation [closed]

I am following the Coursera NLP specialization, and in particular the lab "Another explanation about PCA" in Course 1 Week 3. From the lab, I recovered the following code. It creates 2 ...
robertspierre's user avatar
0 votes
1 answer
449 views

Which openCv function can be used to compute BEV perspective transformation given a point coordinates and the camera extrinsics/intrinsics?

I have the 3x3 intrinsics and 4x3 extrinsics matrices ...
Maf's user avatar
  • 125
0 votes
0 answers
455 views

What does an image pose (camera to world) mean?

I have 1000 2D images of a 3D scene. For each image, I have pose (camera to world) as follows: ...
Sid's user avatar
  • 155
0 votes
1 answer
40 views

How to get used to matricial/vectorial operations?

I came to data science/machine learning from another background in computer science and i feel that i'm lacking of experience with matricial/vectorial operations. Python or Matlab, for instance, ...
heresthebuzz's user avatar
1 vote
1 answer
50 views

Matrix notation in Sutton and Barto

On pg. 206 of Barto and Sutton's Reinforcement Learning, there is a curious statement about the result of a scalar product: As I interpret it, A is the expectation of a scalar product of two d-...
corazza's user avatar
  • 113
1 vote
0 answers
235 views

How can I get a value of context vector in GPT?

I'm a newbie in NLP and I'm now stuck in GPT. The question I'm struggling with is related to a term 'context vector' It says in the following (sorry that the material provided is written in korean) ...
Jiyoon's user avatar
  • 11
1 vote
0 answers
28 views

Sparse Covariance Selection

I was reading this article https://www.di.ens.fr/~aspremon/PDF/CovSelSIMAX.pdf, whose goal is to estimate the covariance matrix from a the sample covariance matrix drawn from a distribution $X$. ' ...
mbz0's user avatar
  • 11
1 vote
1 answer
625 views

Conventions for dimensions of input and weight matrices in neural networks?

Im currently learning neural networks and I see conflicting decsriptions of the dimensions of weight and input matrices on the internet. I just wanted to know if there is some convention which more ...
Tim von Känel's user avatar
-1 votes
2 answers
57 views

what is the meaning of $\mathbb{R}^{768\times (768 * 2)}$?

Hi I'm an undergraduate student interested in Machine Learning. I was reading a paper from ICLR 2020 and came a cross a weird looking vector dimensions. Can anyone tell me what this means?? $\mathbb{R}...
Aesop's user avatar
  • 3
6 votes
1 answer
8k views

What types of matrix multiplication are used in Machine Learning? When are they used?

I'm looking at equations for neural networks and backpropagation and I see this symbol in the equations, ⊙. I thought matrix multiplication of neural networks always involved matrices that matched ...
Ant's user avatar
  • 187
1 vote
1 answer
43 views

Can all known ML algorithms be written as a sequence of matrix operations?

I keep hearing that machine learning is just linear algebra. Does that mean all known (and all possible?) ML algos, from random forest, to support-vector machines, to recursive neural networks, can ...
SubstantialRange's user avatar
0 votes
1 answer
554 views

How to create a matrix from two given vectors in R in RStudio?

Suppose, $c(1, 2, 3, 4)$ and $c(2, 4, 5, 6)$ are two vectors. Then in R or RStudio, How to create a $4\times 2$ matrix from these two vectors? Also, how to add another vector $c(8, 9, 10, 11)$ ...
gete's user avatar
  • 103
0 votes
1 answer
1k views

Trying to understand the result provided by np.linalg.norm function in numpy (normalisation)

I'm new to data science with a moderate math background. I'm playing around with numpy and can across the following: So after reading np.linalg.norm, to my ...
Nanoboss's user avatar
  • 103
0 votes
1 answer
124 views

How do I use matrix math in irregular neural networks such as those generated from neuroevolution (NEAT)?

I understand how to structure the matrix when every node in a layer is fully connected to every node in adjacent layers and I understand that in "irregular" neural networks I can just process each ...
Austin Capobianco's user avatar
1 vote
0 answers
30 views

What is the kernel matrix used for in the kernel trick?

I have $n$ linearly inseperable datapoints, $x_1 \dots , x_n$. I use the kernel trick to map and compute the dot product in higher dimensions (without actually mapping / transforming the data). ...
user13341805's user avatar
1 vote
1 answer
672 views

How to compute Hessian matrix for log-likelihood function for Logistic Regression

I am currently studying the Elements of Statistical Learning book. The following equation is in page 120. It calculates the Hessian matrix for the log-likelihood function as follows \begin{equation} ...
samarendra chandan bindu Dash's user avatar
0 votes
1 answer
34 views

Why don't the dimensions in this linear regression equation match up?

I'm going through an article on linear regression, and they give the following formula for computing estimates: The convention is that all vectors are column vectors. So if ...
RNdev's user avatar
  • 111
3 votes
1 answer
224 views

tensorflow pseudo inverse doesn't work for complex matrices!

The Tensorflow documentation here says that: tf.linalg.pinv is ''analogous to numpy.linalg.pinv. It differs only in default value of rcond''. However, tf.linalg.pinv requires the matrix to ...
eMichel's user avatar
  • 33