summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Dobsan <pdobsan@gmail.com>2018-04-28 23:39:11 +0200
committerPeter Dobsan <pdobsan@gmail.com>2018-04-28 23:39:11 +0200
commitea1bfea4486f8f2c646f82dabd1ff9a222b68506 (patch)
tree2c3609260db970f7d3d50dec8a6c572047f5f59b
parent1286ae831088236213ea0ea94b0b288a2e0ce4bb (diff)
parent9c84385e8a546a54a4eb24402a0d881748090e07 (diff)
Merge branch 'fix-vector-show-instance'
Fixed the leftovers.
-rw-r--r--packages/base/src/Internal/Container.hs31
1 files changed, 8 insertions, 23 deletions
diff --git a/packages/base/src/Internal/Container.hs b/packages/base/src/Internal/Container.hs
index 46e9cf3..a498069 100644
--- a/packages/base/src/Internal/Container.hs
+++ b/packages/base/src/Internal/Container.hs
@@ -43,12 +43,9 @@ import Prelude hiding ((<>))
43[-3.0,-0.5,2.0,4.5,7.0] 43[-3.0,-0.5,2.0,4.5,7.0]
44it :: Vector Double 44it :: Vector Double
45 45
46>>> linspace 5 (8,2+i) :: Vector (Complex Double) 46>>> linspace 5 (8,2:+1) :: Vector (Complex Double)
47 47[8.0 :+ 0.0,6.5 :+ 0.25,5.0 :+ 0.5,3.5 :+ 0.75,2.0 :+ 1.0]
48<interactive>:6:17: ERROR: 48it :: Vector (Complex Double)
49 Variable not in scope: i :: Complex Double
50
51fromList [8.0 :+ 0.0,6.5 :+ 0.25,5.0 :+ 0.5,3.5 :+ 0.75,2.0 :+ 1.0]
52 49
53Logarithmic spacing can be defined as follows: 50Logarithmic spacing can be defined as follows:
54 51
@@ -213,23 +210,11 @@ optimiseMult = mconcat
213 210
214{- | Compute mean vector and covariance matrix of the rows of a matrix. 211{- | Compute mean vector and covariance matrix of the rows of a matrix.
215 212
216>>> meanCov $ gaussianSample 666 1000 (fromList[4,5]) (diagl[2,3]) 213>>> meanCov $ gaussianSample 666 1000 (fromList[4,5]) (trustSym $ diagl [2,3])
217 214([3.9933155655086696,5.061409102770331],Herm (2><2)
218<interactive>:4:52: ERROR: 215 [ 1.9963242906624408, -4.227815571404954e-2
219 • Couldn't match expected type ‘Herm Double’ 216 , -4.227815571404954e-2, 3.2003833097832857 ])
220 with actual type ‘Matrix Double’ 217it :: (Vector Double, Herm Double)
221 • In the fourth argument of ‘gaussianSample’, namely
222 ‘(diagl [2, 3])’
223 In the second argument of ‘($)’, namely
224 ‘gaussianSample 666 1000 (fromList [4, 5]) (diagl [2, 3])’
225 In the expression:
226 meanCov $ gaussianSample 666 1000 (fromList [4, 5]) (diagl [2, 3])
227
228(fromList [4.010341078059521,5.0197204699640405],
229(2><2)
230 [ 1.9862461923890056, -1.0127225830525157e-2
231 , -1.0127225830525157e-2, 3.0373954915729318 ])
232
233-} 218-}
234meanCov :: Matrix Double -> (Vector Double, Herm Double) 219meanCov :: Matrix Double -> (Vector Double, Herm Double)
235meanCov x = (med,cov) where 220meanCov x = (med,cov) where