Questions tagged [covariance-matrix]

70 questions
5
votes
0 answers

Project ellipsoid with 7 parameter camera

I have a function which projects a point using a 7 parameter camera model: Vec2 project(const Rot3& R, // camera orientation const Vec3& T, // camera pos double f_px, // focal length const Vec3& X) // point…
bgp2000
  • 1,190
  • 10
  • 27
4
votes
1 answer

Matplotlib - Python- GetDist tool - Overlapping 2 triangle plots (triplots) by calling twice the plot function: issue of visible priority between both

In python3, I am faced to 2 issues using the tool GetDist tool to produce triplot of covariance matrix. 1) Currently, I can plot 2 covariance matrixes on the same figure by only one call of the plotting function (triangle_plot). Specifying as first…
youpilat13
  • 65
  • 3
  • 25
  • 65
4
votes
1 answer

How to use a lasso with the Vars package in R

Dear fellow programmers, I'm trying to analyze a high dimensional data set (31 variables, 1100 observations) through a penalized vector autoregression. Since I'm using the techniques introduced by Diebold et. al (2019) to build a network of…
3
votes
1 answer

How to calculate the 3x3 covariance matrix for RGB values across an image dataset?

I need to calculate the covariance matrix for RGB values across an image dataset, and then apply Cholesky decomposition to the final result. The covariance matrix for RGB values is a 3x3 matrix M, where M_(i, i) is the variance of channel i and…
ProGamerGov
  • 614
  • 6
  • 16
3
votes
0 answers

felm function: Negative eigenvalues in multiway clustered variance matrix

I'm running following regression using felm() function in R and receiving following warning messages: malmquist.felm <- felm(malmquist~ IT + logTA + npl | firm + year | 0 | firm + year , data=Data) Warning message: In newols(mm, nostats =…
mary
  • 63
  • 3
3
votes
2 answers

Finding inverse matrix in R

I have a variance covariance matrix S: > S [,1] [,2] [1,] 4 -3 [2,] -3 9 I am trying to find an inverse of it. The code I have is: >invS <- (1/((S[1,1]*S[2,2])-(S[1,2]*S[2,1])))*S [,1] [,2] [1,] 0.1481481…
Feyzi Bagirov
  • 1,040
  • 3
  • 18
  • 34
3
votes
1 answer

How to calculate the Standard error from a Variance-covariance matrix?

I am calculating a variance-covariance matrix and I see two different ways of calculating the standard errors: sqrt(diagonal values/number of observations) e.g. standard deviation / sqrt(number of observations) (as is given from on how to…
2
votes
2 answers

Can't calculate np.cov() correctly

This question might be silly, but i couldn't find an explanation to that. I am coding the multivariate probability density function from scratch (for study purposes), and one of the things that i need to compute is the covariance matrix of data. I…
2
votes
0 answers

What does it mean when a covariance matrix values are all the same in hmmlearn - GMMHMM?

I am working with GMMHMM from hmm learn for speaker recognition. After training the model, I found that all the values in the covariance matrix (covars_) all have the same values. I initialised my hmm as follows model = hmm.GMMHMM(n_components=5,…
2
votes
0 answers

PCA without covariance matrix?

How is it possible, that i can calculate PCA without Covariance matrix? The code below do this: With covariance: i substract the mean of every column and calculate the cov()-matrix, before i calculate the eigenvalues and eigenvectors. Without…
2
votes
1 answer

How to check the equality of two covariance matrices?

I need to check two conditions: $E[X]\stackrel{?}{=}\mu$, $E[(X-\mu)(X-\mu)^{\top}]\stackrel{?}{=}\Sigma$. Here $X$ is generated (output) data, $\mu$ is the mean vector, $\Sigma$ is the covariance matrix. $\mu$, $\Sigma$ are input data. For the…
Nick
  • 640
  • 4
  • 20
2
votes
1 answer

Rotate covariance matrix

I am generating 3D gaussian point clouds. I'm using the scipy.stats.multivariate.normal() function, which takes a mean value and a covariance matrix as arguments. It can then provide random samples using the rvs() method. Next I want to perform a…
2
votes
1 answer

interpretation of covariance result matrix

I'm trying to make sense out of reading the result of a covariance matrix. I know if the resulting signs are both >0 then it means the arrays are moving in the same direction. x = np.array([[10,39,19,23,28], [43,13,32,21,20], …
dirtyw0lf
  • 1,537
  • 4
  • 22
  • 53
1
vote
1 answer

Multiply Correlation and Volatility Dataframes with Multi-Index to Get Covariance Matrix

I am multiplying a DataFrame of volatilities (rvm) with a DataFrame of correlations (omega_tilde) to obtain a covariance matrix. The rvm DataFrame (5790 rows × 10 columns): NoDur Durbl Manuf Enrgy HiTec Telcm Shops …
1
vote
0 answers

Getting the origin and orientation of point cloud plane cluster using Covariance Matrix in pcl

I'm facing some troubles for calculation of the orientation of an extracted point cloud plane. The plane is representing the surface of a rectangular part. I need to get origin and orientation to feed the robot in an pick application. The following…
1
2 3 4 5