Questions tagged [linear-algebra]

A field of mathematics concerned with the study of finite dimensional vector spaces, including matrices and their manipulation, which are important in statistics.

Filter by
Sorted by
Tagged with
0 votes
0 answers
5 views

Application of eigenvalues, eigenvector, transposed matrix

Can you give me please some application of eigenvectors, eigenvalues and matrix transposition in data science? I guess for eigen-values/vectors it would be linear regression PCA and NLP, alongside ...
user avatar
0 votes
0 answers
14 views

Implementing the backward step for conv2d layers

I am trying to recrate the conv2d layers using the eigen library but I have some problem understanding how the backward step for conv2d layers is calculated exactly. Before I go into explaining my ...
user avatar
0 votes
1 answer
20 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 ...
user avatar
  • 137
1 vote
0 answers
27 views

Multi-dimensional Euclidian R^2 squared - reasonable?

I have a high-dimensional space, say $\mathbb{R}^{1000}$, and I have samples $y_1, \ldots , y_n \in \mathbb{R}^{1000}$ and $\hat{y}_1, \ldots , \hat{y}_n \in \mathbb{R}^{1000}$. Would $$ R^2 = 1 - \...
user avatar
0 votes
1 answer
27 views

What what will happen if all the layers of a MLP or any DL architecture are set as same in the beginning?

Setting the initial weights as all zeros will have the output dependent on the bias and setting the weights of all the neurons of a layer as same, will update the gradients in same way thus removing ...
user avatar
  • 313
0 votes
0 answers
16 views

Neural Network for solving these linear algebra problems

Intro There are several questions on this site about whether or not machine learning can solve specific problems. The answer (in my words) seems to be: "Yes, trivially, if you choose a model to ...
user avatar
1 vote
0 answers
11 views

Nearest neighbor face recognition in eigenspace when using dot product of test set with eigenvectors does not match the performance when using sklearn

I am trying to perform Face recognition using PCA (eigenfaces). I have a set of N training images (of dimensions M=wxh), which I have pre-processed into a vertical ...
user avatar
0 votes
0 answers
5 views

A support vector machine for separating pluses from minus finds a support vector at point (1,0) and a minus support vector at x2=(0,1)

Suppose a support vector machine for separating pluses from minus finds a support vector at point (1,0) and a minus support vector at x2=(0,1). Determine the values of w and b.
user avatar
  • 101
0 votes
1 answer
23 views

If an SVM decision boundary is the perpendicular bisector of the line connecting the support vectors, why iterate for it using a loss function?

Would it not make more sense to do some linear algebra to find the vector of the decision boundary? Is that more computationally expensive?
user avatar
0 votes
1 answer
39 views

Why linear model cannot understand the interaction between any two input features?

The book Deep Learning by Ian Goodfellow states that: ...
user avatar
0 votes
0 answers
14 views

NCHW input matrix to Dm conversion logic for convolution in cuDNN

I have been trying to understand the convolution lowering operation shown in the cuDNN paper. I was able to understand most of it by reading through and mapping various parameters to the image below. ...
user avatar
1 vote
0 answers
22 views

Pseudo inverse of the covariance matrix?

I've been looking for methods to compute a pseudo inverse of a covariance matrix. And found that one way is to construct a regularized inverse matrix. By constructing the eigen system, and removing ...
user avatar
  • 11
2 votes
0 answers
55 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 ...
user avatar
0 votes
0 answers
23 views

Is Regression Line an 1-D affine subspace of 2-D vector space?

Background I currently read a book called "Mathematics for Machine Learning" and I read chapter 2 which is about Linear Algebra, especially on subchapter 2.8 which is about Affine Space. The ...
user avatar
1 vote
1 answer
70 views

Understanding Lagrangian equation for SVM

I was trying to understand Lagrangian from SVM section of Andrew Ng's Stanford CS229 course notes. On page 17 and 18, he says: Given the problem $$\begin{align} min_w & \quad f(w) \\ s.t. &...
user avatar
  • 137
0 votes
1 answer
62 views

Understanding SVM mathematics

I was referring SVM section of Andrew Ng's course notes for Stanford CS229 Machine Learning course. On pages 14 and 15, he says: Consider the picture below: How can we find the value of $\gamma^{(i)}...
user avatar
  • 185
1 vote
1 answer
44 views

What are some application of Google's PageRank Algorithm in Data Science

I came across a topic on computational linear algebra that talks about iterative algorithms to compute eigenvalues. I've worked with power method which is an iterative algorithm that converges a ...
user avatar
  • 115
0 votes
0 answers
25 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 ...
user avatar
  • 90
-1 votes
1 answer
28 views

Why do we use 'T' when we are to say matrix-vector product? [closed]

On the first picture author uses $T$ meaning matrix-vector product But other website do not use $T$, but says that $x$ is a vector, I do not understand if it is important or not
user avatar
2 votes
1 answer
2k views

3d input for Dense Layer Keras

Is there any example of how Keras Dense layer handles 3D input. The documentation explains the following: ...
user avatar
1 vote
1 answer
505 views

Difference between FDA and LDA

I have asked this question in Mathematics Stackexchange, thought however that it might be more fit for here: I am currently taking a Data-Analysis course and I learned about both the terms LDA (Linear ...
user avatar
  • 11
0 votes
0 answers
43 views

What is the Intuition behind weight vector W which is normal to the plane? Is the weight vector W same as the W which is normal to the plane π?

In an interview, I was asked the intuition behind the weight vector. I told the weight vector is a vector which we try to minimize to a local minima with the help of regulariser so we don't overfit. ...
user avatar
0 votes
1 answer
149 views

How does the equation "dW = - (2 * (X^T ).dot(Y - Y_hat)) / m" comes in Linear Regression (using Matrix + Gradient Descent)?

I was trying to code the Linear Regression in Python using Matrix Multiplication method using Gradient Descent and followed a code where there was no mention what is the loss but just a code as Per ...
user avatar
  • 313
0 votes
1 answer
27 views

How does tree-based algorithms handle linearly combined features?

While I am aware that tree-based algorithms (e.g., DT, RF, XGBoost) are 'immune' to multi-collinearity, how do they handle linearly combined features? For example, is there is any additional value or ...
user avatar
2 votes
0 answers
45 views

Geometric classification models

In class we have been presented with a Geometric classification model such that the goal is to construct a linear decision boundary $\bf{w} \cdot \bf{x} = t$; where $\bf{w}$ is the vector from the ...
user avatar
1 vote
1 answer
470 views

Dot product and linear regression

I'm studying PCA and my professor said something about finding the linear regression by doing the dot product of both axis. Could someone explain to me why? The dot product returns a number. What's ...
user avatar
0 votes
0 answers
63 views

Why do we usually have fully connected layers of same sizes in CNNs?

Is there any specific reason that we observe in CNNs, the fully connected layers usually have the same sizes? You can verify this for many CNNs. I'm aware that if, for instance, we have a vector of ...
user avatar
  • 13.4k
1 vote
1 answer
127 views

Hypothesis vs Hyperplane in Machine Learning

I am finding it hard to understand the clear difference between Hypothesis and Hyperplane. I know that Hypothesis is a candidate model that maps inputs to outputs after training. And, Hyperplane is ...
user avatar
1 vote
1 answer
110 views

Confusion with Notation in the Book on Deep Learning by Ian Goodfellow et al

In chapter 6.1 on 'Example: Learning XOR', the bottom of page 168 mentions: The activation function $g$ is typically chosen to be a function that is applied element-wise, with $h_i = g(x^TW_{:,i}+c_i)...
user avatar
  • 113
2 votes
0 answers
37 views

Deriving vectorized form of linear regression

We first have the weights of a D dimensional vector $w$ and a D dimensional predictor vector $x$, which are all indexed by $j$. There are $N$ observations, all D dimensional. $t$ is our targets, i.e, ...
user avatar
1 vote
1 answer
885 views

Removing constant from the regression model

I am trying to calibrate two variables $(X,Y)$ of different measuring techniques from two instruments, the result of the linear regression analysis appears as shown in the image. The result shows the ...
user avatar
0 votes
1 answer
33 views

Understanding the algebra behind a specific partial derivative equation

I am following this article about neural networks. Given: Until here I understand everything, but then he continues to: I don't understand how he got to that conclusion. I think he skipped some ...
user avatar
  • 23
0 votes
2 answers
2k views

Dose finding slope/intercept using the formula of m,b gives best fit line always In linear regression?

In liner regression We have to fit different lines and chose one with minimum error so What is the motive of having a formula for m,b that can give slope and intercept value in the regression line ,...
user avatar
  • 1,201
0 votes
1 answer
65 views

Normal equation for linear regression is illogical

Currently I'm taking Andrew Ng's course. He gives a following formula to find solution for linear regression analytically: $θ = (X^T * X)^{-1} * X^T * у$ He doesn't explain it so I searched for it and ...
user avatar
  • 123
0 votes
1 answer
164 views

When is it useful to measure the Frobenius norm of a matrix?

In Deep Learning section 2.5 the author review some measures for the size of vectors and matrices. When in general is it useful for someone to know these? For instance they give the example of the ...
user avatar
  • 121
2 votes
0 answers
61 views

Intuition behind understanding eigenvectors and Machine Learning [closed]

I am struggling to understand linear algebra application in machine learning, and I am not able to answer the following question. Is the model learned in Machine Learning the eigenvector of the ...
user avatar
1 vote
1 answer
38 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 ...
user avatar
2 votes
4 answers
302 views

How to solve Ax = b for A [closed]

Given two know vector x, and b (dimension 3*1 for example), what are the ways to approximate the matrix ...
user avatar
  • 143
1 vote
3 answers
214 views

Why transpose of independent feature matrix is necessary in case of linear regression?

I can follow classical linear regression steps: $Xw=y$ $X^{-1}Xw=X^{-1}y$ $Iw=X^{-1}y$ $w=X^{-1}y$ However, on implementing in Python, I see that instead of simply using ...
user avatar
  • 907
1 vote
2 answers
559 views

Linear regression with a fixed intercept and everything is in log

I have a set of values for a surface (in pixels) that becomes bigger over time (exponentially). The surface consists of cells that divide over time. After doing some modelling, I came up with the ...
user avatar
3 votes
2 answers
45 views

Backpropagation with a different sized training set?

I'm trying to create a NN whose input is a (length m) array of 3d vectors $$\vec{x}_i = [x_{i,1},x_{i,2},x_{i,3}], \hspace{5mm}i=1:m $$ and whose output is a similarly sized array: $$\vec{h}_{\theta,...
user avatar
  • 31
1 vote
0 answers
39 views

What's wrong with my backpropagation through time (BTT) calculation or how to multiple a scaled vector and a matrix without matching dimensions?

I am trying to make a pretty simple RNN from scracth, using only Numpy library of Python. At this moment I am having troubles with BTT as I do not know how to proceed with situation when a ...
user avatar
  • 19
3 votes
1 answer
108 views

How to incorporate the uncertainty of the model coefficients in the prediction interval of a multiple linear regression

I'm dealing with modeling small experimental data sets. As most experimental work does not generate thousands of samples, but rather a handful, I need to be inventive about how to deal with this small ...
user avatar
1 vote
0 answers
41 views

How effective is Moore Penrose for solving regression problems with overdetermined system of equations?

For regression problems with #Predictors > #observations, I recently read about Moore Penrose (pseudo inverse method) which solves the problem of non invertible matrix in OLS for regression problems. ...
user avatar
0 votes
0 answers
45 views

Workng of LME model used for a set of category variable(s) and a continuous variable?

LME models are being used to analyze the effect of continuos data and category data. Is this model appropriate for checking the effect of two independent variables - one with continuous values and ...
user avatar
3 votes
0 answers
22 views

Possible flaw in the MDS method for dimensionality reduction

The MDS (multidimensional scaling) method is used to solve the problem of dimensionality reduction. Basically, it does the following: given $n$ points $x_1,\cdots,x_n\in\mathbb R^d$, try to find a ...
user avatar
  • 131
4 votes
2 answers
1k views

How do we define a linearly separable problem?

When we talk about Perceptrons, we say that they are limited for approximating functions that are linearly separable, while Neural Networks that use non-linear transformations are not. I am having ...
user avatar
2 votes
1 answer
62 views

optimizing a linear optimization function with linear constarints and binary variables

I am new to optimizations and trying to solve a problem, which I feel falls in the umbrella of optimization. I have an ojective function that needs to be maximized ...
user avatar
  • 515
2 votes
1 answer
42 views

Need explanation of a matrix multiplication

I'm reading the Deep Learning book by MIT. On the page 172, there's a part like this: $$ f^{(1)}(x)=h=W^Tx \tag{1} $$ $$ f^{(2)}(h)=h^Tw \tag{2} $$ Substitute (1) into (2), they got: $$ f(x)=w^TW^Tx $...
user avatar
  • 23
3 votes
1 answer
448 views

Why in this case are gradient steps not perpendicular to contour lines?

There is a theorem that gradient at point is perpendicular to tangent line to contour line at given point. Why in this picture it seems that this rule is not respected? source: http://www....
user avatar