Skip to content
Advertisement

how to get covariance matrix in tensorflow?

How could I get covariance matrix in tensorflow? Like numpy.cov() in numpy.

For example, I want to get covariance matrix of tensor A, now I have to use numpy instead

JavaScript

Is there anyway to get cov by tensorflow instead of numpy?

It is differnet from the problem how to compute covariance in tensorflow, where their problem is to compute covariance for two vector, while mine is to compute covariance matrix of a matrix(a 2D tensor) effectively using tensorflow API

Advertisement

Answer

This is months late but anyway posting for completeness.

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement