Hacker News new | ask | show | jobs
by sjg007 2162 days ago
Makes sense. A graph can be represented by a matrix which is what an image is.
2 comments

Images and matrices are 2D data structures of numbers, but that is where the similarities end. An image is more like a vector, which matrices can be applied to. You would never matrix multiply an image onto another vector. Still, it isn’t uncommon to visualize matrices as images.
Well a matrix is a collection of vectors so... I guess I somewhat agree.. You can certainly apply projections to images, I mean this is what photoshop does.
> Well a matrix is a collection of vectors so

That's like saying "a matrix is a collection of real numbers, so anything you say about one applies to the other".

> You can certainly apply projections to images, I mean this is what photoshop does.

This doesn't seem to refer to anything in the comment you're replying to.

Would you please elaborate on your last point?
In reply to a comment that said nothing about projections, you wrote:

> You can certainly apply projections to images, I mean this is what photoshop does.

What's the relationship of this to anything in the comment you replied to?

"You would never matrix multiply an image onto another vector."
Even if you never matrix multiply with an image, it's still useful to have it in matrix form for other things like PCA/SVD.
Typical use on PCA/SVD on image, what you do is treat each image as a vector, create a matrix out of a collection of images, and then do PCA/SVD on the matrix to analyze the distribution of the images, normalize, get the eigen-images (principal components), etc.
Yeah, in retrospect that seems like the way to do it. The toy examples I learned from in college did it on a single image split up by row, but I can’t think of a great use case for that besides some naive compression.
An image "is" not a matrix. Yes, the values of each pixel can be considered an entry of a matrix, but that's where the similarity ends. Unless the graph is very dense, doing convolutions on the image representing the graph is a pretty arbitrary thing to do. Graph CNNs exist and make a lot more sense in general.
I think the terminology may have been confusing here. I meant graphs in the sense of graphical plots, not graph theory graphs.
Ah, my bad.