correlation matrix in python

后端 未结 4 723
孤街浪徒
孤街浪徒 2020-12-08 20:08

How do I calculate correlation matrix in python? I have an n-dimensional vector in which each element has 5 dimension. For example my vector looks like

[
 [0.1, .         


        
4条回答
  •  借酒劲吻你
    2020-12-08 21:05

    Here is a pretty good example of calculating a correlations matrix form multiple time series using Python. Included source code calculates correlation matrix for a set of Forex currency pairs using Pandas, NumPy, and matplotlib to produce a graph of correlations.

    Sample data is a set of historical data files, and the output is a single correlation matrix and a plot. The code is very well documented.

提交回复
热议问题