OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

# Questions tagged [matrix]

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

76 questions
Filter by
Sorted by
Tagged with
8 views

### pytorch is_leaf problem

I have a problem about is_leaf of the rotation_matrix i defined below in picture 1.Picture 2 shows how do i get rotation[i] by using getattr to get it from model_params. Picture 3 shows how do i use ...
8 views

### Discuss kNN, test/train, random projection, unit vector, vectored matrix, hamming distance, stft, Y=(aAX1:M)

Suggestion Investigation Looking for suggestions or guide for how to setup a clean approach and discussion on how to apply a python suggested way to solve this challenge Looking for suggestions or ...
11 views

### CNN matrix shape issue when adding new convolutional layer

I have been adding more & more convolutional layers to my model to see how they effect model size & accuracy. It was all going fine until I added my 6th convolutional layer. ...
• 101
22 views

### Why does largest eigen value used for eigen vector calcuation?

Why is the largest eigenvalue used for eigenvector calculation? What is the significance of using a largest absolute value for the whitening of a picture?
• 105
1 vote
31 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 ...
39 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]). ...
18 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 ...
277 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 ...
844 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: ...
45 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 ...
1 vote
501 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 ...
• 11
1 vote
21 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 ...
• 721
35 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 ...
1 vote
818 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 ...
1 vote
56 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 ...
196 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. ...
• 314
84 views

### Back propagation matrix shape error using Python

I wanna implement the back-propagation algorithm in python with the next code ...
84 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 ...
• 11
64 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 ...
• 137
1 vote
119 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 ...
1 vote
59 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 ...
234 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 ...
52 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. ...
85 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 ...
2k 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 ...
• 169
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 ...
• 101
183 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 ...
• 90
85 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?
• 149
1 vote
43 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 ...
• 167
19 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 ...
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. ...
1 vote
117 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: ...
• 111
1 vote
767 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 ...
497 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 ...
• 125
558 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: ...
• 155
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, ...
• 395
1 vote
51 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-...
• 113
1 vote
251 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) ...
• 11
1 vote
29 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$. ' ...
• 11
1 vote
740 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 ...
61 views

1 vote
773 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 ...
36 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 ...
• 111