summaryrefslogtreecommitdiff
path: root/examples/pca2.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2007-10-01 15:04:16 +0000
committerAlberto Ruiz <aruiz@um.es>2007-10-01 15:04:16 +0000
commitc99b8fd6e3f8a2fb365ec12baf838f864b118ece (patch)
tree11b5b8515861fe88d547253ae10c2182d5fadaf2 /examples/pca2.hs
parent768f08d4134a066d773d56a9c03ae688e3850352 (diff)
LinearAlgebra and GSL moved to Numeric
Diffstat (limited to 'examples/pca2.hs')
-rw-r--r--examples/pca2.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/pca2.hs b/examples/pca2.hs
index bd498e4..8c20370 100644
--- a/examples/pca2.hs
+++ b/examples/pca2.hs
@@ -1,6 +1,6 @@
1-- Improved PCA, including illustrative graphics 1-- Improved PCA, including illustrative graphics
2 2
3import LinearAlgebra 3import Numeric.LinearAlgebra
4import Graphics.Plot 4import Graphics.Plot
5import System.Directory(doesFileExist) 5import System.Directory(doesFileExist)
6import System(system) 6import System(system)
@@ -24,7 +24,7 @@ type Stat = (Vec, [Double], Mat)
24stat :: Mat -> Stat 24stat :: Mat -> Stat
25stat x = (m, toList s, trans v) where 25stat x = (m, toList s, trans v) where
26 m = mean x 26 m = mean x
27 (s,v) = eigS (cov x) 27 (s,v) = eigSH' (cov x)
28 28
29-- creates the compression and decompression functions from the desired reconstruction 29-- creates the compression and decompression functions from the desired reconstruction
30-- quality and the statistics of a data set 30-- quality and the statistics of a data set