kortschak
74a6648c88
stat: update matrix error imports
2015-10-27 09:02:28 +10:30
kortschak
c48cebcab1
stat: use scaled SymOuterK
2015-09-30 16:05:17 +09:30
btracey
b2b470fdc0
Change CovarianceMatrix and CorrelationMatrix to use *SymDense instead of *Dense
2015-09-29 07:17:27 -06:00
kortschak
fb3f59debf
stat: match changes in mat64
2015-08-15 11:43:21 +09:30
btracey
55a603be8c
Update stat for the new API of MulTrans and MulVec
2015-08-02 22:56:09 -06:00
Jonathan J Lawlor
f654bb78ec
Add CorrelationMatrix and Cov2Corr functions
...
This change includes a function to calculate correlation the
correlation matrix of input data, and unexported functions which
can convert between covariance matrices and correlation matrices.
There are also tests for CorrelationMatrix, and benchmarks for
the conversion functions.
2015-02-02 23:04:27 -05:00
Jonathan J Lawlor
d39f7d1528
change CovarianceMatrix to use MulTrans
...
MulTrans is much faster than Mul, and by taking the square root of the
weights we can always use MulTrans.
add test for negative weights
add benchmarks for weighted covariance
reorder code so simple path is first
fix test error message to include fixture number
re-add comment on making the returned type symmetric
2015-01-30 17:18:47 -05:00
btracey
bc03fc2360
Fix Covmat to use RawRowView
2015-01-15 17:25:25 -08:00
kortschak
650327e533
Remove unnecessary intermediate var
2014-12-27 09:01:35 +10:30
Jonathan J Lawlor
07dd900803
change the name of the N variable to n
2014-12-24 15:22:21 -05:00
Jonathan J Lawlor
93f33faa81
add tests for immutability
2014-12-23 21:03:12 -05:00
Jonathan J Lawlor
10947b5d63
expand algo comment
2014-12-23 20:15:00 -05:00
Jonathan J Lawlor
c540265584
go fmt
2014-12-22 22:04:23 -05:00
Jonathan J Lawlor
7357da958d
Change to simpler impl
...
By taking advantage of some gonum functions, it is possible to remove
much of the code related to centering the columns. Also tidied up
many of the comments.
2014-12-22 22:04:07 -05:00
Jonathan J Lawlor
00773a9c4f
change panic to use mat64.ErrShape
2014-12-21 18:57:58 -05:00
Jonathan J Lawlor
831ced4cf7
Improve comment on normalization factor.
2014-12-21 18:55:52 -05:00
Jonathan J Lawlor
0e425f0d55
Improve comment on what algorithm is used
2014-12-21 18:54:44 -05:00
Jonathan J Lawlor
bce5c81adc
update doc, add test for mat64.Vec
2014-12-02 21:08:47 -05:00
Jonathan J Lawlor
0d3fcca1eb
change mat64.Vec to []float64
2014-12-02 20:47:56 -05:00
Jonathan J Lawlor
2121128140
convert At call to range
...
wts is a []float64, which means we can range over it, which will be
faster than calling At in a loop.
2014-11-29 15:33:07 -05:00
Jonathan J Lawlor
86e8ba26e0
change covariance matrix to accept weight vector
...
mat64.Matrix would accept matrixes with more than one column.
Enforcing size by using a Vec makes more sense.
2014-11-29 14:49:28 -05:00
Jonathan J Lawlor
893b875678
expand on help text
2014-11-18 20:14:21 -05:00
Jonathan J Lawlor
14b1ccae5f
impl weighted cov matrix and in place assignment
2014-11-18 19:24:36 -05:00
Jonathan J Lawlor
989dd3093f
remove non-blas codepath
...
Also put ones directly into CovarianceMatrix function
2014-11-17 23:58:32 -05:00
Jonathan J Lawlor
6430780117
go fmt
2014-11-17 22:31:17 -05:00
Jonathan J Lawlor
a4f07999f2
split out non-blas impl into new function
...
Splitting out the non blas path makes the code flow easier to read.
2014-11-17 22:26:52 -05:00
Jonathan J Lawlor
4b7d9b397a
add help for non-exported variance and covariance
2014-11-17 22:25:45 -05:00
Jonathan J Lawlor
945308d34b
improve godoc for CovarianceMatrix
2014-11-17 22:24:29 -05:00
Jonathan J Lawlor
ae1d5e1ddc
simplify example implementation
2014-11-15 23:22:05 -05:00
Jonathan J Lawlor
db6bc68a0c
example implementation of pure go covariancematrix
2014-11-15 23:11:17 -05:00
Jonathan J Lawlor
8043a909f5
use var in place of new
2014-11-15 15:37:10 -05:00
Jonathan J Lawlor
35fb0d0413
improve comments
2014-11-15 15:14:24 -05:00
Jonathan J Lawlor
17b440e6be
improve performance and decrease memory use
2014-11-15 14:35:21 -05:00
Jonathan J Lawlor
6a93054869
run go fmt
...
oops
2014-11-15 01:18:45 -05:00
Jonathan J Lawlor
63a1bac14c
Initial work on covariancematrix
2014-11-15 00:49:46 -05:00