How to augment a machine learning matrix?

  • Context: Graduate 
  • Thread starter Thread starter strat468
  • Start date Start date
Click For Summary
SUMMARY

The discussion centers on augmenting a machine learning matrix to solve for the weights (w) and bias (b) in the equation 0 = -2*x^T(y - 2(w*x + b)). The user is guided to compute w*x + b to derive expressions involving w1, w2, and b1. The conversation highlights the confusion around matrix dimensions, specifically that w*x results in a scalar due to the matrix multiplication of a 1x2 matrix (w) and a 2x1 matrix (x). The user is encouraged to utilize LaTeX for mathematical expressions and to consult external resources for further understanding.

PREREQUISITES
  • Understanding of matrix multiplication and dimensions
  • Familiarity with linear algebra concepts
  • Proficiency in LaTeX for mathematical notation
  • Basic knowledge of machine learning matrix formulations
NEXT STEPS
  • Learn how to augment matrices in linear algebra
  • Study the properties of scalar and vector multiplication
  • Explore the use of LaTeX for mathematical documentation
  • Investigate the implications of singular matrices in machine learning
USEFUL FOR

Students and practitioners in machine learning, data scientists, and anyone looking to deepen their understanding of matrix operations and linear algebra applications in machine learning.

strat468
Messages
7
Reaction score
1
TL;DR
augmenting a machine learning matrix
I have this equation which my professor has told me is correct so far.

##0 = -2*x^T(y-2(w*x+b))##

where
##x=\begin{bmatrix}
1 \\
2
\end{bmatrix}##
##y = 6##
##w =
\begin{bmatrix}
w1 & w2
\end{bmatrix}
##
##b = [b1]##

He told me to then augment w and b into one matrix in order to solve for both w and b.

How on earth do I do that?
 
Last edited:
Physics news on Phys.org
Start by computing ##w \cdot x + b## to get an expression in w1, w2 and b1 and go from there.

I'm assuming you meant to solve:

##0 = −2 \cdot x^T (y−2(w \cdot x+b)##

Also please use Latex to enter your expressions and show us your work. Our site uses Mathjax to render Latex and wew have a small guide to help you. See the link in my signature below.
 
jedishrfu said:
Start by computing ##w \cdot x + b## to get an expression in w1, w2 and b1 and go from there.

I'm assuming you meant to solve:

##0 = −2 \cdot x^T (y−2(w \cdot x+b)##

Also please use Latex to enter your expressions and show us your work. Our site uses Mathjax to render Latex and we have a small guide to help you. See the link in my signature below.
Yes! Sorry Im new, I didnt know
 
Ill check out that resource.

Im not trying to be negative but Im reading that LaTeX guide, and Im putting delimiters in and its not doing anything
 
Ok got LaTeX working! Now I just need to figure out how to augment this
 
Last edited:
  • Like
Likes   Reactions: jedishrfu
The equation in your first post is somewhat confusing. ##w \cdot x## is a scalar and so wx+b is also a scalar leading to the conclusion that ##0## must be the zero row vector [0 0] ?
 
How is ##w*x## a scalar? x is a 2x1 matrix and w is a 1x2 matrix


I changed the formatting a bit so its easier to read
 
I see what youre implying. ##w*x## would be a scalar because it ends up being a 1x1 matrix. Youre correct.

All he told me was to set my equation to 0 and then solve for w and b. I then asked him how I solve for two unknown variables with only one equation and his reply was to augment w and b into one matrix.
 
  • #10
strat468 said:
TL;DR Summary: augmenting a machine learning matrix

I have this equation which my professor has told me is correct so far.
##0 = -2*x^T(y-2(w*x+b))##

where
##x=\begin{bmatrix} 1 \\ 2 \end{bmatrix}##
##y = 6##
##w = \begin{bmatrix} w1 & w2 \end{bmatrix}##
##b = [b1]##
I'm a bit confused by this. x is defined as a 2 x 1 column vector. In the first equation, ##x^T## would therefore have to be a 1 x 2 row vector. Is this correct?

It would be useful to see the actual problem description as given by your professor.
 
  • #11
1712540919130.png


I am currently on part 3
After pestering him over and over about this he finally gave me this....
1712541102996.png


But now the problem Im running into is
1712541130314.png

is a singular matrix making
1712541180938.png

impossible
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 33 ·
2
Replies
33
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 24 ·
Replies
24
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 27 ·
Replies
27
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
1K